(()=>{var e={942:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function l(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=s(e,r(n)))}return e}function r(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return l.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)o.call(e,n)&&e[n]&&(t=s(t,n));return t}function s(e,t){return t?e?e+" "+t:e+t:e}e.exports?(l.default=l,e.exports=l):void 0===(n=function(){return l}.apply(t,[]))||(e.exports=n)}()}},t={};function n(o){var l=t[o];if(void 0!==l)return l.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";const e=window.wp.blocks,t=window.wp.element;var o=n(942),l=n.n(o);const r=window.wp.i18n,s=window.wp.blockEditor,i=(window.lodash,window.moment,window.wp.data);window.wp.date;const a=window.wp.components;function c(e){const{attributes:n,setAttributes:o,isSelected:l,clientId:i,name:c}=e,u="mailster-workflow/condition-yes"===c;return(0,t.createElement)(s.InspectorControls,null,(0,t.createElement)(a.Panel,null,(0,t.createElement)(a.PanelBody,null,(0,t.createElement)(a.PanelRow,null,u?(0,r.__)("These steps run if the condition is fullfilled.","mailster"):(0,r.__)("These steps run if the condition is not fullfilled.","mailster")))))}const u=(0,t.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)("g",{fill:"none"},(0,t.createElement)("path",{d:"M0 0h24v24H0z"}),(0,t.createElement)("path",{stroke:"#46b450",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M6.944 19H5.056A1.056 1.056 0 014 17.944v-7.388C4 9.973 4.473 9.5 5.056 9.5h1.888C7.527 9.5 8 9.973 8 10.556v7.388C8 18.527 7.527 19 6.944 19zM8 10.572l3.649-4.751a1.734 1.734 0 012.714-.046v0c.265.321.409.725.409 1.141v3.271h3.096a1.8 1.8 0 011.496.799l.329.491a1.8 1.8 0 01.234 1.499l-1.359 4.722A1.8 1.8 0 0116.839 19H10.55a1.8 1.8 0 01-1.318-.574L8 17.1"}))),d=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"mailster-workflow/condition-yes","title":"Condition fulfilled","category":"mailster-automation-fields","parent":["mailster-workflow/condition-yes"],"example":{},"supports":{"html":false,"inserter":false,"className":false,"customClassName":false,"reusable":false,"lock":false},"attributes":{"lock":{"type":"object","default":{"remove":true,"move":true}}},"usesContext":["mailster-workflow/weight"],"textdomain":"mailster","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}'),{name:m,...p}=d;(0,e.registerBlockType)(m,{...p,icon:u,edit:function(e){const{attributes:n,setAttributes:o,isSelected:a,clientId:u,context:d,name:m}=e,p=["mailster-step-condition","canvas-handle"],f="mailster-workflow/condition-yes"===m;(e=>function(e,t,n=!0){const o=function(e,t=null,n=!0){const{getBlocks:o,getBlockRootClientId:l}=(0,i.select)("core/block-editor"),r=o(t);let s=[];return function t(o){o.forEach((o=>{o.name&&new RegExp(e,"g").test(o.name)&&(o.rootClientId=l(o.clientId),s.push(o)),n&&o.innerBlocks.length>0&&t(o.innerBlocks)}))}(r),s}("mailster-workflow/stop",t,n);return!!o.length&&o[0]}(0,e,!1))(u)&&p.push("mailster-has-stop"),p.push(f?"yes":"no");const w=f?(0,r.__)("Condition is fullfilled","mailster"):(0,r.__)("Condition is not fullfilled","mailster"),v=(0,s.useBlockProps)({className:l()({},p)}),h=(0,s.useInnerBlocksProps)({className:"canvas-handle"},{allowedBlocks:["mailster-workflow/stop"],templateLock:!1});return(0,t.createElement)(t.Fragment,null,(0,t.createElement)("div",v,(0,t.createElement)("div",{className:"line line-in canvas-handle"},(0,t.createElement)("span",{className:"condition-label",title:w})),(0,t.createElement)("div",h),(0,t.createElement)("div",{className:"line line-out canvas-handle"})),(0,t.createElement)(c,e))},save:function(e){return(0,t.createElement)(s.InnerBlocks.Content,s.useBlockProps.save())}})})()})();