!function(){"use strict";var e={1609:function(e){e.exports=window.React},4164:function(e,n,r){function t(e){var n,r,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(n=0;n<a;n++)e[n]&&(r=t(e[n]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}n.A=function(){for(var e,n,r=0,o="",a=arguments.length;r<a;r++)(e=arguments[r])&&(n=t(e))&&(o&&(o+=" "),o+=n);return o}},6087:function(e){e.exports=window.wp.element},8168:function(e,n,r){function t(){return t=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var t in r)({}).hasOwnProperty.call(r,t)&&(e[t]=r[t])}return e},t.apply(null,arguments)}r.d(n,{A:function(){return t}})}},n={};function r(t){var o=n[t];if(void 0!==o)return o.exports;var a=n[t]={exports:{}};return e[t](a,a.exports,r),a.exports}r.d=function(e,n){for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)};var t=r(8168),o=r(6087),a=window.wp.i18n,l=r(4164),c=r(1609),i=["value","onChange","id","name","hasLabel","toggleLabelOn","toggleLabelOff","error","className"];(0,c.forwardRef)(function(e,n){var r,c=e.value,s=e.onChange,u=e.id,g=e.name,f=e.hasLabel,b=void 0!==f&&f,d=e.toggleLabelOn,m=void 0===d?(0,a.__)("On","sugar-calendar-bookings-lite"):d,p=e.toggleLabelOff,v=void 0===p?(0,a.__)("Off","sugar-calendar-bookings-lite"):p,h=e.error,y=void 0!==h&&h,O=e.className,w=function(e,n){if(null==e)return{};var r,t,o=function(e,n){if(null==e)return{};var r={};for(var t in e)if({}.hasOwnProperty.call(e,t)){if(n.includes(t))continue;r[t]=e[t]}return r}(e,n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(t=0;t<a.length;t++)r=a[t],n.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,i);return u=u||g,s&&(r=function(e){s(e.target.checked)}),(0,o.createElement)("div",{className:(0,l.A)("sugar-calendar-bookings-toggle-control",O,{"sugar-calendar-bookings-toggle-control--error":y})},(0,o.createElement)("input",(0,t.A)({ref:n,type:"checkbox",id:u,name:g,checked:c,onChange:r},w)),(0,o.createElement)("label",{className:"sugar-calendar-bookings-toggle-control-icon",htmlFor:u}),b&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("label",{className:"sugar-calendar-bookings-toggle-control-status sugar-calendar-bookings-toggle-control-status-on",htmlFor:u},m),(0,o.createElement)("label",{className:"sugar-calendar-bookings-toggle-control-status sugar-calendar-bookings-toggle-control-status-off",htmlFor:u},v)))})}();