import{bZ as k,aw as I,ax as N,ay as w,aA as A,j as b,V as G,b_ as z,b$ as T,aC as Z,c0 as q,c1 as H,r as J,bv as K}from"./index-DTC0Ed21.js";const[L,D]=k(),[Q,U]=k();var j={root:"m_7cda1cd6","root--default":"m_44da308b","root--contrast":"m_e3a01f8",label:"m_1e0e6180",remove:"m_ae386778",group:"m_1dcfd90b"};const X={},Y=A((o,{gap:t},{size:e})=>({group:{"--pg-gap":t!==void 0?z(t):z(e,"pg-gap")}})),$=I((o,t)=>{const e=N("PillGroup",X,o),{classNames:v,className:r,style:n,styles:p,unstyled:d,vars:P,size:u,disabled:f,...m}=e,a=D(),s=(a==null?void 0:a.size)||u||void 0,i=w({name:"PillGroup",classes:j,props:e,className:r,style:n,classNames:v,styles:p,unstyled:d,vars:P,varsResolver:Y,stylesCtx:{size:s},rootSelector:"group"});return b.jsx(Q,{value:{size:s,disabled:f},children:b.jsx(G,{ref:t,size:s,...i("group"),...m})})});$.classes=j;$.displayName="@mantine/core/PillGroup";const W={variant:"default"},B=A((o,{radius:t},{size:e})=>({root:{"--pill-fz":z(e,"pill-fz"),"--pill-height":z(e,"pill-height"),"--pill-radius":t===void 0?void 0:Z(t)}})),C=I((o,t)=>{const e=N("Pill",W,o),{classNames:v,className:r,style:n,styles:p,unstyled:d,vars:P,variant:u,children:f,withRemoveButton:m,onRemove:a,removeButtonProps:s,radius:i,size:l,disabled:c,mod:R,..._}=e,y=U(),x=D(),E=l||(y==null?void 0:y.size)||void 0,M=(x==null?void 0:x.variant)==="filled"?"contrast":u||"default",S=w({name:"Pill",classes:j,props:e,className:r,style:n,classNames:v,styles:p,unstyled:d,vars:P,varsResolver:B,stylesCtx:{size:E}});return b.jsxs(G,{component:"span",ref:t,variant:M,size:E,...S("root",{variant:M}),mod:[{"with-remove":m&&!c,disabled:c||(y==null?void 0:y.disabled)},R],..._,children:[b.jsx("span",{...S("label"),children:f}),m&&b.jsx(T,{variant:"transparent",radius:i,tabIndex:-1,"aria-hidden":!0,unstyled:d,...s,...S("remove",{className:s==null?void 0:s.className,style:s==null?void 0:s.style}),onMouseDown:g=>{var h;g.preventDefault(),g.stopPropagation(),(h=s==null?void 0:s.onMouseDown)==null||h.call(s,g)},onClick:g=>{var h;g.stopPropagation(),a==null||a(),(h=s==null?void 0:s.onClick)==null||h.call(s,g)}})]})});C.classes=j;C.displayName="@mantine/core/Pill";C.Group=$;var V={field:"m_45c4369d"};const ss={type:"visible"},F=I((o,t)=>{const e=N("PillsInputField",ss,o),{classNames:v,className:r,style:n,styles:p,unstyled:d,vars:P,type:u,disabled:f,id:m,pointer:a,mod:s,...i}=e,l=D(),c=q(),R=w({name:"PillsInputField",classes:V,props:e,className:r,style:n,classNames:v,styles:p,unstyled:d,rootSelector:"field"}),_=f||(l==null?void 0:l.disabled);return b.jsx(G,{component:"input",ref:H(t,l==null?void 0:l.fieldRef),"data-type":u,disabled:_,mod:[{disabled:_,pointer:a},s],...R("field"),...i,id:(c==null?void 0:c.inputId)||m,"aria-invalid":l==null?void 0:l.hasError,"aria-describedby":c==null?void 0:c.describedBy,type:"text",onMouseDown:y=>!a&&y.stopPropagation()})});F.classes=V;F.displayName="@mantine/core/PillsInputField";const es={},O=I((o,t)=>{const e=N("PillsInput",es,o),{children:v,onMouseDown:r,onClick:n,size:p,disabled:d,__staticSelector:P,error:u,variant:f,...m}=e,a=J.useRef(null);return b.jsx(L,{value:{fieldRef:a,size:p,disabled:d,hasError:!!u,variant:f},children:b.jsx(K,{size:p,error:u,variant:f,component:"div",ref:t,onMouseDown:s=>{var i;s.preventDefault(),r==null||r(s),(i=a.current)==null||i.focus()},onClick:s=>{var l;s.preventDefault();const i=s.currentTarget.closest("fieldset");i!=null&&i.disabled||((l=a.current)==null||l.focus(),n==null||n(s))},...m,multiline:!0,disabled:d,__staticSelector:P||"PillsInput",withAria:!1,children:v})})});O.displayName="@mantine/core/PillsInput";O.Field=F;export{C as P,O as a};
