<script setup lang="ts">
import SearchForm from '@/components/advanced/search-form.vue';

defineOptions({
  name: 'ModelConfigSearch',
  inheritAttrs: false
});

defineProps<{
  modelTypeOptions: { label: string; value: string }[];
}>();

const model = defineModel<Api.ModelConfig.ContractModelConfigSearchParams>('model', { required: true });
</script>

<template>
  <SearchForm v-model:model="model" v-bind="$attrs">
    <template #formItem>
      <NFormItemGi span="24 s:12 m:6" label="模型名称" class="pr-24px">
        <NInput v-model:value="model.modelName" placeholder="请输入参数名称" />
      </NFormItemGi>
      <NFormItemGi span="24 s:12 m:6" label="模型类型" class="pr-24px">
        <NSelect v-model:value="model.modelType" :options="modelTypeOptions" />
      </NFormItemGi>
      <NFormItemGi span="24 s:12 m:6" label="模型秘钥" class="pr-24px">
        <NInput v-model:value="model.modelKey" placeholder="请输入参数键名" />
      </NFormItemGi>
    </template>
  </SearchForm>
</template>

<style scoped></style>
