Liferay.Loader.define("segments-web@3.0.77/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){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=_interopRequireDefault(a("@frontend-taglib-clay$clayui/icon")),n=_interopRequireDefault(a("liferay!frontend-js-react-web$classnames")),r=(a("liferay!frontend-js-react-web$prop-types"),function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();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 _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _extends(){return(_extends=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 _objectWithoutProperties(e,t){if(null==e)return{};var a,l,n=function _objectWithoutPropertiesLoose(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 ClayToggle extends r.Component{render(){const e=this.props,{checked:t,className:a,disabled:o,iconOff:c,iconOn:i,label:s,labelLeft:f,labelOff:u,labelOn:d,labelRight:b,name:p,onChange:g}=e,h=_objectWithoutProperties(e,["checked","className","disabled","iconOff","iconOn","label","labelLeft","labelOff","labelOn","labelRight","name","onChange"]),y=(0,n.default)("toggle-switch",a);return r.default.createElement("label",_extends({className:y},h),r.default.createElement("input",{checked:t,className:"toggle-switch-check",disabled:o,name:p,onChange:g,type:"checkbox"}),s&&r.default.createElement("span",{className:"toggle-switch-label"},s),f&&r.default.createElement("span",{className:"toggle-switch-text toggle-switch-text-left"},f),b&&r.default.createElement("span",{className:"toggle-switch-text toggle-switch-text-right"},b),r.default.createElement("span",{"aria-hidden":"true",className:"toggle-switch-bar"},r.default.createElement("span",{className:"toggle-switch-handle","data-label-off":u,"data-label-on":d},c&&r.default.createElement("span",{className:"button-icon button-icon-off toggle-switch-icon"},r.default.createElement(l.default,{symbol:c})),i&&r.default.createElement("span",{className:"button-icon button-icon-on toggle-switch-icon"},r.default.createElement(l.default,{symbol:i})))))}}!function _defineProperty(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}(ClayToggle,"defaultProps",{checked:!1,label:"",labelLeft:"",labelOff:"",labelOn:"",labelRight:""});var o=ClayToggle;t.default=o}}));
//# sourceMappingURL=ClayToggle.es.js.map