Liferay.Loader.define("segments-web@3.0.68/js/components/shared/ClayToggle.es",["module","exports","require","@frontend-taglib-clay$clayui/icon","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react"],(function(e,t,a){var l,n,r;window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var c=i(a("@frontend-taglib-clay$clayui/icon")),o=i(a("liferay!frontend-js-react-web$classnames")),s=(a("liferay!frontend-js-react-web$prop-types"),function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=f();if(t&&t.has(e))return t.get(e);var a={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=l?Object.getOwnPropertyDescriptor(e,n):null;r&&(r.get||r.set)?Object.defineProperty(a,n,r):a[n]=e[n]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react")));function f(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return f=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)Object.prototype.hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e}).apply(this,arguments)}function d(e,t){if(null==e)return{};var a,l,n=function(e,t){if(null==e)return{};var a,l,n={},r=Object.keys(e);for(l=0;l<r.length;l++)a=r[l],t.indexOf(a)>=0||(n[a]=e[a]);return n}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(l=0;l<r.length;l++)a=r[l],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}class e extends s.Component{render(){const e=this.props,{checked:t,className:a,disabled:l,iconOff:n,iconOn:r,label:f,labelLeft:i,labelOff:b,labelOn:p,labelRight:g,name:y,onChange:m}=e,h=d(e,["checked","className","disabled","iconOff","iconOn","label","labelLeft","labelOff","labelOn","labelRight","name","onChange"]),O=(0,o.default)("toggle-switch",a);return s.default.createElement("label",u({className:O},h),s.default.createElement("input",{checked:t,className:"toggle-switch-check",disabled:l,name:y,onChange:m,type:"checkbox"}),f&&s.default.createElement("span",{className:"toggle-switch-label"},f),i&&s.default.createElement("span",{className:"toggle-switch-text toggle-switch-text-left"},i),g&&s.default.createElement("span",{className:"toggle-switch-text toggle-switch-text-right"},g),s.default.createElement("span",{"aria-hidden":"true",className:"toggle-switch-bar"},s.default.createElement("span",{className:"toggle-switch-handle","data-label-off":b,"data-label-on":p},n&&s.default.createElement("span",{className:"button-icon button-icon-off toggle-switch-icon"},s.default.createElement(c.default,{symbol:n})),r&&s.default.createElement("span",{className:"button-icon button-icon-on toggle-switch-icon"},s.default.createElement(c.default,{symbol:r})))))}}r={checked:!1,label:"",labelLeft:"",labelOff:"",labelOn:"",labelRight:""},(n="defaultProps")in(l=e)?Object.defineProperty(l,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):l[n]=r;var b=e;t.default=b}}));
//# sourceMappingURL=ClayToggle.es.js.map