import{e as m,J as b,c as l,o as t,t as s,a7 as i,a8 as p,r as x,f as r,b as d,a as h,j as c,n as u,i as S,F as k,a9 as v,y as I}from"./app-B4kV47qU.js";const V={__name:"InputFieldError",props:{message:String},setup(e){return(f,n)=>{var a;return m((t(),l("span",{class:"mt-1 block text-red-500 text-danger text-sm"},s(e.message),513)),[[b,(a=e.message)==null?void 0:a.length]])}}},C={key:0,class:"label mb-1 capitalize"},L={class:"flex items-center"},w={key:0,class:"flex h-[38px] w-9 items-center justify-center rounded-md rounded-r-none bg-dark-100 dark:bg-dark-700"},B=["type","value","placeholder","step"],M=Object.assign({inheritAttrs:!1},{__name:"InputField",props:i({label:{type:String,default:""},subLabel:{type:String,default:null},subLabelClass:{type:String,default:"text-primary-500"},classes:{type:String,default:""},type:{type:String,default:"text"},prefixIcon:{type:String,default:null},prefixIconType:{type:String,default:"icon"},error:{type:String,default:null},placeholder:{type:String,default:""},step:{type:String,default:"any"}},{modelValue:{},modelModifiers:{}}),emits:i(["update:modelValue"],["update:modelValue"]),setup(e,{emit:f}){const n=p(e,"modelValue");return(a,o)=>{const y=x("Icon");return t(),l("div",{class:u(["w-full",e.classes])},[e.label?(t(),l("label",C,[c(s(a.trans(e.label))+" ",1),e.subLabel?(t(),l("span",{key:0,class:u(["text-xs",e.subLabelClass])},"( "+s(a.trans(e.subLabel))+" )",3)):r("",!0)])):r("",!0),d("div",L,[e.prefixIcon?(t(),l("div",w,[e.prefixIconType=="icon"?(t(),S(y,{key:0,icon:e.prefixIcon,class:"text-base"},null,8,["icon"])):(t(),l(k,{key:1},[c(s(e.prefixIcon),1)],64))])):r("",!0),m(d("input",I(a.$attrs,{type:e.type,value:e.modelValue,"onUpdate:modelValue":o[0]||(o[0]=g=>n.value=g),class:["input",{"border border-danger-600":e.error,"rounded-l-none":e.prefixIcon}],placeholder:e.placeholder,step:e.step}),null,16,B),[[v,n.value]])]),h(V,{message:e.error},null,8,["message"])],2)}}});export{M as _};
