import{o as e}from"./utils-BakkG8Vx.js";import{d as t,f as n,i as r,m as i,t as a}from"./hooks.module-5xe-uC6c.js";import{Et as o}from"./content_renderer-CoENEE63.js";import{t as s}from"./jsxRuntime.module--xb8gfv5.js";import{Y as c}from"./hooks-CSTgmcXO.js";t();function l({name:t,disabled:l,label:u,currentValue:d,onChange:f,hint:p,containerStyle:m}){let h=a(null),g=c(t);i(()=>{if(!p||!h.current)return;let e=o.getOrCreateInstance(h.current,{html:!0,customClass:`tooltip-top`});return()=>e?.dispose()},[p]);let _=r(()=>p?{textDecoration:`underline dotted var(--main-text-color)`}:void 0,[p]),v=n(e=>{f(e.target.checked)},[f]),y=r(()=>p?e(p):void 0,[p]);return s(`div`,{className:`form-checkbox ${l?`disabled`:``}`,style:m,children:s(`label`,{className:`form-check-label tn-checkbox`,style:_,title:y,ref:h,children:[s(`input`,{id:g,className:`form-check-input`,type:`checkbox`,name:g,checked:d||!1,value:`1`,disabled:l,onChange:v}),u]})})}export{l as t};