Liferay.Loader.define("portal-workflow-kaleo-designer-web@5.0.115/designer/js/definition-builder/diagram-builder/components/sidebar/sections/timers/TimerDuration",["module","exports","require","@frontend-taglib-clay$clayui/form","@frontend-taglib-clay$clayui/icon","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../SidebarPanel","./TimerFields"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r("@frontend-taglib-clay$clayui/form"),i=_interopRequireDefault(r("@frontend-taglib-clay$clayui/icon")),n=(_interopRequireDefault(r("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 r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var n=a?Object.getOwnPropertyDescriptor(e,i):null;n&&(n.get||n.set)?Object.defineProperty(r,i,n):r[i]=e[i]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react"))),l=_interopRequireDefault(r("../../SidebarPanel")),u=_interopRequireDefault(r("./TimerFields"));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}}var _default=({duration:e,durationScale:t,recurrence:r,recurrenceScale:c,selectedItem:o,setTimerSections:d,timerIdentifier:f,timersIndex:s})=>{const[g,m]=(0,n.useState)(!!r&&!!c);return n.default.createElement(l.default,{panelTitle:Liferay.Language.get("duration")},n.default.createElement(u.default,{durationScaleValue:t,durationValue:e,selectedItem:o,setTimerSections:d,timerIdentifier:f,timersIndex:s}),n.default.createElement("div",{className:"timers-duration-toggle"},n.default.createElement(a.ClayToggle,{label:Liferay.Language.get("recurrence"),onToggle:()=>{g?(m(!1),d((e=>{const t=[...e];return delete t[s].recurrence,delete t[s].recurrenceScale,t}))):m(!0)},toggled:g}),n.default.createElement("span",{className:"ml-2",title:Liferay.Language.get("repeat-the-action-at-a-given-duration-until-the-workflow-task-is-completed")},n.default.createElement(i.default,{className:"text-muted",symbol:"question-circle-full"}))),g&&n.default.createElement(u.default,{durationScaleValue:c,durationValue:r,recurrence:!0,scaleHelpText:Liferay.Language.get("recurrence"),selectedItem:o,setTimerSections:d,timerIdentifier:f,timersIndex:s}))};t.default=_default}}));
//# sourceMappingURL=TimerDuration.js.map