import{c as e,s as t,z as n}from"./useRouterState-DyVgzXuA.js";import{E as r,R as i,S as a,St as o,T as s,c,lt as l,pt as u,xt as d}from"./button-cdxnqcgzwko8ooha-DePtDphh.js";import{S as f}from"./api-CJ3Zq7MY.js";import{t as p}from"./label-latndvb1ngem7we8-C29SvVC5.js";var m=n(t(),1),h=new Map([[`bold`,m.createElement(m.Fragment,null,m.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H40a12,12,0,0,1,0-24H216A12,12,0,0,1,228,128Z`}))],[`duotone`,m.createElement(m.Fragment,null,m.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),m.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z`}))],[`fill`,m.createElement(m.Fragment,null,m.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H72a8,8,0,0,1,0-16H184a8,8,0,0,1,0,16Z`}))],[`light`,m.createElement(m.Fragment,null,m.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H40a6,6,0,0,1,0-12H216A6,6,0,0,1,222,128Z`}))],[`regular`,m.createElement(m.Fragment,null,m.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H40a8,8,0,0,1,0-16H216A8,8,0,0,1,224,128Z`}))],[`thin`,m.createElement(m.Fragment,null,m.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H40a4,4,0,0,1,0-8H216A4,4,0,0,1,220,128Z`}))]]),g=m.forwardRef((e,t)=>m.createElement(d,{ref:t,...e,weights:h}));g.displayName=`MinusIcon`;var _=e(),v=(0,m.createContext)({controlFirst:!0}),y=(0,m.forwardRef)(({className:e,checked:t,indeterminate:n,disabled:a,variant:c=`default`,label:u,labelTooltip:d,controlFirst:m=!0,onCheckedChange:h,onValueChange:v,onChange:y,required:b,name:x,...S},C)=>{let w=(0,_.jsx)(i,{ref:C,name:x,checked:t,indeterminate:n,disabled:a,onCheckedChange:(e,t)=>{h?.(e),v?.(e),y&&y(Object.assign(t.event,{target:{checked:e}}))},className:o(`relative flex h-4 w-4 items-center justify-center rounded-sm border-0 bg-kumo-base ring after:absolute after:-inset-x-3 after:-inset-y-2`,c===`error`?`ring-kumo-danger`:`ring-kumo-line`,!a&&`hover:ring-kumo-hairline focus-visible:ring-kumo-hairline`,`data-[checked]:bg-kumo-contrast data-[checked]:ring-kumo-contrast data-[indeterminate]:bg-kumo-contrast data-[indeterminate]:ring-kumo-contrast`,a&&`cursor-not-allowed opacity-50`,e),...S,children:(0,_.jsx)(l,{keepMounted:!0,className:`flex items-center justify-center text-kumo-inverse data-[unchecked]:invisible`,render:(e,t)=>(0,_.jsx)(`span`,{...e,children:t.indeterminate?(0,_.jsx)(g,{weight:`bold`,size:12}):(0,_.jsx)(f,{weight:`bold`,size:12})})})});return u?(0,_.jsx)(s,{className:`inline-flex`,children:(0,_.jsxs)(r,{className:o(`!m-0 !min-h-0 !text-base inline-flex items-center gap-2`,m?`flex-row`:`flex-row-reverse justify-end`,a?`cursor-not-allowed`:`cursor-pointer`),children:[w,(0,_.jsx)(p,{showOptional:b===!1,tooltip:d,asContent:!0,children:u})]})}):w});y.displayName=`Checkbox`;var b=(0,m.forwardRef)(({className:e,checked:t,indeterminate:n,disabled:r,variant:a=`default`,label:s,value:c,onCheckedChange:u,onValueChange:d,name:p},h)=>{let{controlFirst:y}=(0,m.useContext)(v);return(0,_.jsxs)(`label`,{className:o(`m-0 relative inline-flex items-center gap-2`,!y&&`flex-row-reverse justify-end`,r?`cursor-not-allowed opacity-50`:`cursor-pointer`,e),children:[(0,_.jsx)(i,{ref:h,value:c,name:p,checked:t,indeterminate:n,disabled:r,onCheckedChange:e=>{u?.(e),d?.(e)},className:o(`peer relative flex h-4 w-4 items-center justify-center rounded-sm border-0 bg-kumo-base ring after:absolute after:-inset-x-3 after:-inset-y-2`,a===`error`?`ring-kumo-danger`:`ring-kumo-line`,!r&&`group-hover:ring-kumo-hairline hover:ring-kumo-hairline focus-visible:ring-kumo-hairline`,`data-[checked]:bg-kumo-contrast data-[checked]:ring-kumo-contrast data-[indeterminate]:bg-kumo-contrast data-[indeterminate]:ring-kumo-contrast`),children:(0,_.jsx)(l,{keepMounted:!0,className:`flex items-center justify-center text-kumo-inverse data-[unchecked]:invisible`,render:(e,t)=>(0,_.jsx)(`span`,{...e,children:t.indeterminate?(0,_.jsx)(g,{weight:`bold`,size:12}):(0,_.jsx)(f,{weight:`bold`,size:12})})})}),(0,_.jsx)(`span`,{className:`text-base text-kumo-default`,children:s})]})});b.displayName=`Checkbox.Item`;function x({legend:e,children:t,error:n,description:r,defaultValue:i,value:s,onValueChange:l,allValues:d,disabled:f,controlFirst:p=!0,className:m}){return(0,_.jsx)(v.Provider,{value:{controlFirst:p},children:(0,_.jsx)(u,{defaultValue:i,value:s,onValueChange:l,allValues:d,disabled:f,children:(0,_.jsxs)(c,{className:o(`flex flex-col gap-4`,m),children:[(0,_.jsx)(a,{className:`text-base font-medium text-kumo-default`,children:e}),(0,_.jsx)(`div`,{className:`flex flex-col gap-2`,children:t}),n&&(0,_.jsx)(`p`,{className:`text-sm text-kumo-danger`,children:n}),r&&(0,_.jsx)(`p`,{className:`text-sm text-kumo-subtle`,children:r})]})})})}var S=Object.assign(y,{Item:b,Group:x});S.displayName=`Checkbox`;export{S as t};