import { defineComponent } from 'vue'
import { formInputProps, fromInputEmits } from '../../form-input-props'
import { useFormInput } from '@cip/components/hooks/form-input'
import { ElInput } from 'element-plus'
import './index.less'
export default defineComponent({
  props: formInputProps,
  emits: [...fromInputEmits],
  setup (props, context) {
    const { proxyValue, proxyOtherValue } = useFormInput(props, context)
    return () => <div class={'basic-link'}>
      <ElInput
        class={'basic-link__name'}
        v-model={proxyOtherValue[0].value}
        clearable={true}>
        {{
          prepend: () => <span>链接名称</span>
        }}
      </ElInput>
      <ElInput
        class={'basic-link__href'}
        v-model={proxyValue.value}
        clearable={true}>
        {{
          prepend: () => <span>链接地址</span>
        }}
      </ElInput>
    </div>
  }
})
