import{P as f,c as i}from"./DT-hKSom.js";import{a as m}from"./b1l8QPBl.js";import{d as l,c as d,o as n,w as p,D as u,m as c,u as e,L as _}from"./m2W8DxR4.js";import{r as b}from"./DN4yyKL7.js";import{g}from"./56PacuBL.js";var v=l({__name:"Label",props:{for:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"label"}},setup(t){const a=t;return m(),(o,r)=>(n(),d(e(f),c(a,{onMousedown:r[0]||(r[0]=s=>{!s.defaultPrevented&&s.detail>1&&s.preventDefault()})}),{default:p(()=>[u(o.$slots,"default")]),_:3},16))}}),y=v;const x=l({__name:"Label",props:{for:{},asChild:{type:Boolean},as:{},class:{}},setup(t){const a=t,o=b(a,"class");return(r,s)=>(n(),d(e(y),c({"data-slot":"label"},e(o),{class:e(i)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",a.class)}),{default:p(()=>[u(r.$slots,"default")]),_:3},16,["class"]))}}),F=l({__name:"FormLabel",props:{for:{},asChild:{type:Boolean},as:{},class:{}},setup(t){const a=t,{error:o,formItemId:r}=g();return(s,C)=>(n(),d(e(x),{"data-slot":"form-label","data-error":!!e(o),class:_(e(i)("data-[error=true]:text-destructive-foreground",a.class)),for:e(r)},{default:p(()=>[u(s.$slots,"default")]),_:3},8,["data-error","class","for"]))}});export{F as _};
