import{d as e,f as t,i as n,l as r,t as i}from"./hooks.module-BrXTvcfS.js";import{r as a}from"./bootstrap.esm-DbsKxb7T.js";import{_ as o}from"./i18n-BaLR3UdQ.js";import{t as s}from"./jsxRuntime.module-Cao1NCKs.js";import{et as c}from"./hooks-ClTXKdUl.js";e();function l({name:e,disabled:l,label:u,currentValue:d,indeterminate:f,onChange:p,hint:m,containerStyle:h}){let g=i(null),_=i(null),v=c(e);r(()=>{_.current&&(_.current.indeterminate=f??!1)},[f]),r(()=>{if(!m||!g.current)return;let e=a.getOrCreateInstance(g.current,{html:!0,customClass:`tooltip-top`});return()=>e?.dispose()},[m]);let y=n(()=>m?{textDecoration:`underline dotted var(--main-text-color)`}:void 0,[m]),b=t(e=>{p(e.target.checked)},[p]),x=n(()=>m?o(m):void 0,[m]);return s(`div`,{className:`form-checkbox ${l?`disabled`:``}`,style:h,children:s(`label`,{className:`form-check-label tn-checkbox`,style:y,title:x,ref:g,children:[s(`input`,{id:v,ref:_,className:`form-check-input`,type:`checkbox`,name:v,checked:d||!1,value:`1`,disabled:l,onChange:b}),u]})})}export{l as t};