1import{u as j}from"./B_ZaJEvG.js";import{S as w,d as C,h as r,i as a,k as h,t as m,N as s,aL as l,aW as i,X as t,F as n,I as o,y as d,aX as I,aP as v,aO as q,a5 as G,R as p,s as N,b3 as O,a9 as P,aQ as B}from"./CfwR7KjC.js";const F={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=q(B.ui.strategy,B.ui.formGroup,F),R=C({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:f,attrs:b}=j("formGroup",v(e,"ui"),g,v(e,"class")),u=G("form-errors",null),y=p(()=>{var z,S;return e.error&&typeof e.error=="string"||typeof e.error=="boolean"?e.error:(S=(z=u==null?void 0:u.value)==null?void 0:z.find(V=>V.path===e.name))==null?void 0:S.message}),k=p(()=>f.value.size[e.size??g.default.size]),$=N(O());return P("form-group",{error:y,inputId:$,name:p(()=>e.name),size:p(()=>e.size),eagerValidation:p(()=>e.eagerValidation)}),{ui:f,attrs:b,inputId:$,size:k,error:y}}}),A=["for"];function X(e,f,b,u,y,k){return a(),r("div",t({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(t({key:0},{error:e.error,label:e.label,name:e.name,hint:e.hint,description:e.description,help:e.help}))):(a(),r(n,{key:1},[o(d(e.label),1)],64))],10,A),e.hint||e.$slots.hint?(a(),r("span",{key:0,class:s([e.ui.hint])},[e.$slots.hint?l(e.$slots,"hint",i(t({key:0},{error:e.error,label:e.label,name:e.name,hint:e.hint,description:e.description,help:e.help}))):(a(),r(n,{key:1},[o(d(e.hint),1)],64))],2)):m("",!0)],2)):m("",!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(t({key:0},{error:e.error,label:e.label,name:e.name,hint:e.hint,description:e.description,help:e.help}))):(a(),r(n,{key:1},[o(d(e.description),1)],64))],2)):m("",!0)],2),h("div",{class:s([e.label?e.ui.container:""])},[l(e.$slots,"default",i(I({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(t({key:0},{error:e.error,label:e.label,name:e.name,hint:e.hint,description:e.description,help:e.help}))):(a(),r(n,{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(t({key:0},{error:e.error,label:e.label,name:e.name,hint:e.hint,description:e.description,help:e.help}))):(a(),r(n,{key:1},[o(d(e.help),1)],64))],2)):m("",!0)],2)],16)}const Q=w(R,[["render",X]]);export{Q as default};
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.