<template>
    <kuc-text className="kuc-text-input" :value="modelValue" @change="updateValue" />
</template>
  
  <script setup lang="ts">
  import type { KucEvent } from '@/types/my-kintone';
  import type { TextInputEventDetail } from 'kintone-ui-component';
  import { defineProps, defineEmits, type Ref } from 'vue';
  
  const props = defineProps<{
    modelValue: string;
  }>();
  
  const emit = defineEmits<{
    (e: 'update:modelValue', value: string): void;
  }>();
  
  const updateValue = ({ detail }: KucEvent<TextInputEventDetail>) => {
    emit('update:modelValue', detail.value || '');
  };
  </script>
  