<template>
  <h-input v-model:value="value"></h-input>
</template>
<script lang="ts">
import { defineComponent, ref } from 'vue';
import { Input } from '@crami/ui';

export default defineComponent({
  name: 'Test',
  props: {
    componentProps: {
      type: Object,
      default: () => {
        return {
          defaultValue: {
            type: String,
            default: '',
          },
        };
      },
    },
  },
  components: { HInput: Input },
  setup(props) {
    const value = ref(props.componentProps.defaultValue);
    const getData = () => {
      return value.value;
    };

    return { value, getData };
  },
});
</script>
