"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/jsx-runtime.js"),l=require("../../icons/Check.js"),r=require("./styles.js"),c=require("../../utils/index.js");function h({checked:u,disabled:d,id:a,onChange:x,value:o,label:t,name:p,...s}){const g=j=>x(j),i=c.getId(s["data-testid"]),n=c.getId(s["data-testid"]);return e.jsxRuntimeExports.jsxs(r.Wrapper,{htmlFor:a||t,"data-testid":i("wrapper"),"data-trackid":n("wrapper"),children:[t&&e.jsxRuntimeExports.jsx(r.ToggleLabel,{disabled:d,"aria-label":t,"data-testid":i("label"),children:t}),e.jsxRuntimeExports.jsxs(r.ToggleWrapper,{children:[e.jsxRuntimeExports.jsx(r.ToggleInput,{id:a||t,name:p,value:o,checked:u,"aria-checked":s["aria-checked"],disabled:d,type:"checkbox",role:"checkbox",onChange:g,"data-testid":i("input"),"data-trackid":n("input")}),e.jsxRuntimeExports.jsx(r.ToggleSlider,{children:e.jsxRuntimeExports.jsx(l.default,{})})]})]})}exports.Toggle=h;
