1import{_ as j,Y as q,d as r,e as a,p as h,h as f,n as s,f as l,J as i,s as n,F as t,y as o,q as d,K as w,ah as C,ai as S,N as I,c as p,ao as N,r as G,az as O,V as P,ap as V}from"./9h935L-y.js";const A={wrapper:"",inner:"",label:{wrapper:"flex content-center items-center justify-between",base:"block font-medium text-gray-700 dark:text-gray-200",required:"after:content-['*'] after:ms-0.5 after:text-red-500 dark:after:text-red-400"},size:{"2xs":"text-xs",xs:"text-xs",sm:"text-sm",md:"text-sm",lg:"text-sm",xl:"text-base"},container:"mt-1 relative",description:"text-gray-500 dark:text-gray-400",hint:"text-gray-500 dark:text-gray-400",help:"mt-2 text-gray-500 dark:text-gray-400",error:"mt-2 text-red-500 dark:text-red-400",default:{size:"sm"}},g=N(V.ui.strategy,V.ui.formGroup,A),F=q({inheritAttrs:!1,props:{name:{type:String,default:null},size:{type:String,default:null,validator(e){return Object.keys(g.size).includes(e)}},label:{type:String,default:null},description:{type:String,default:null},required:{type:Boolean,default:!1},help:{type:String,default:null},error:{type:[String,Boolean],default:null},hint:{type:String,default:null},class:{type:[String,Object,Array],default:()=>""},ui:{type:Object,default:()=>({})},eagerValidation:{type:Boolean,default:!1}},setup(e){const{ui:m,attrs:b}=C("formGroup",S(e,"ui"),g,S(e,"class")),u=I("form-errors",null),y=p(()=>{var z,v;return e.error&&typeof e.error=="string"||typeof e.error=="boolean"?e.error:(v=(z=u==null?void 0:u.value)==null?void 0:z.find(B=>B.path===e.name))==null?void 0:v.message}),k=p(()=>m.value.size[e.size??g.default.size]),$=G(O());return P("form-group",{error:y,inputId:$,name:p(()=>e.name),size:p(()=>e.size),eagerValidation:p(()=>e.eagerValidation)}),{ui:m,attrs:b,inputId:$,size:k,error:y}}}),R=["for"];function D(e,m,b,u,y,k){return a(),r("div",n({class:e.ui.wrapper},e.attrs),[h("div",{class:s(e.ui.inner)},[e.label||e.$slots.label?(a(),r("div",{key:0,class:s([e.ui.label.wrapper,e.size])},[h("label",{for:e.inputId,class:s([e.ui.label.base,e.required?e.ui.label.required:""])},[e.$slots.label?l(e.$slots,"label",i(n({key:0},{error:e.error,label:e.label,name:e.name,hint:e.hint,description:e.description,help:e.help}))):(a(),r(t,{key:1},[o(d(e.label),1)],64))],10,R),e.hint||e.$slots.hint?(a(),r("span",{key:0,class:s([e.ui.hint])},[e.$slots.hint?l(e.$slots,"hint",i(n({key:0},{error:e.error,label:e.label,name:e.name,hint:e.hint,description:e.description,help:e.help}))):(a(),r(t,{key:1},[o(d(e.hint),1)],64))],2)):f("",!0)],2)):f("",!0),e.description||e.$slots.description?(a(),r("p",{key:1,class:s([e.ui.description,e.size])},[e.$slots.description?l(e.$slots,"description",i(n({key:0},{error:e.error,label:e.label,name:e.name,hint:e.hint,description:e.description,help:e.help}))):(a(),r(t,{key:1},[o(d(e.description),1)],64))],2)):f("",!0)],2),h("div",{class:s([e.label?e.ui.container:""])},[l(e.$slots,"default",i(w({error:e.error}))),typeof e.error=="string"&&e.error?(a(),r("p",{key:0,class:s([e.ui.error,e.size])},[e.$slots.error?l(e.$slots,"error",i(n({key:0},{error:e.error,label:e.label,name:e.name,hint:e.hint,description:e.description,help:e.help}))):(a(),r(t,{key:1},[o(d(e.error),1)],64))],2)):e.help||e.$slots.help?(a(),r("p",{key:1,class:s([e.ui.help,e.size])},[e.$slots.help?l(e.$slots,"help",i(n({key:0},{error:e.error,label:e.label,name:e.name,hint:e.hint,description:e.description,help:e.help}))):(a(),r(t,{key:1},[o(d(e.help),1)],64))],2)):f("",!0)],2)],16)}const K=j(F,[["render",D]]);export{K as _};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.