(()=>{"use strict";var e,t={329:()=>{const e=window.React,t=window.wp.i18n;function n(e){var t,r,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var l=e.length;for(t=0;t<l;t++)e[t]&&(r=n(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}const r=function(){for(var e,t,r=0,o="",l=arguments.length;r<l;r++)(e=arguments[r])&&(t=n(e))&&(o&&(o+=" "),o+=t);return o},o=window.wp.blocks,l=window.wp.blockEditor,i=(window.wp.serverSideRender,window.wp.components),a=window.wp.element,{createBlock:s}=(window.lodash,wp.blocks),c={from:[{type:"block",blocks:["oik-block/countdown"],transform:function(e){return s("oik/countdown",e)}},{type:"shortcode",tag:"bw_countdown",attributes:{since:{type:"string",shortcode:({named:{since:e}})=>e},until:{type:"string",shortcode:({named:{until:e}})=>e},url:{type:"string",shortcode:({named:{url:e}})=>e},description:{type:"string",shortcode:({named:{description:e}})=>e},expirytext:{type:"string",shortcode:({named:{expirytext:e}})=>e},format:{type:"string",shortcode:({named:{format:e}})=>e}}}]};(0,o.registerBlockType)("oik/countdown",{transforms:c,edit:n=>{const{attributes:o,setAttributes:s,instanceId:c,focus:u,isSelected:d}=n,{textAlign:b,label:p}=n.attributes,m=(0,l.useBlockProps)({className:r({[`has-text-align-${b}`]:b})});var w=n.attributes,f="[bw_countdown";for(var h of Object.keys(w)){var v=w[h];v&&(f=f+" "+h+'="'+v+'"')}return f+="]",(0,e.createElement)(a.Fragment,null,(0,e.createElement)(l.InspectorControls,null,(0,e.createElement)(i.PanelBody,null,(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,t.__)("Since","oik"),value:n.attributes.since,onChange:e=>{n.setAttributes({since:e})}})),(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,t.__)("Until","oik"),value:n.attributes.until,onChange:e=>{n.setAttributes({until:e})}})),(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,t.__)("URL","oik"),value:n.attributes.url,onChange:e=>{n.setAttributes({url:e})}})),(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,t.__)("Description","oik"),value:n.attributes.description,onChange:e=>{n.setAttributes({description:e})}})),(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,t.__)("Expiry Text","oik"),value:n.attributes.expirytext,onChange:e=>{n.setAttributes({expirytext:e})}})),(0,e.createElement)(i.PanelRow,null,(0,e.createElement)(i.TextControl,{label:(0,t.__)("Format","oik"),value:n.attributes.format,onChange:e=>{n.setAttributes({format:e})}})))),(0,e.createElement)("div",{...m},(0,e.createElement)("p",null,(0,t.__)("The Countdown block will be rendered on the front end.","oik")," ",(0,e.createElement)("br",null),(0,t.__)("Shortcode equivalent:","oik"),(0,e.createElement)("br",null),f)))},save:()=>null})}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var l=n[e]={exports:{}};return t[e](l,l.exports,r),l.exports}r.m=t,e=[],r.O=(t,n,o,l)=>{if(!n){var i=1/0;for(u=0;u<e.length;u++){for(var[n,o,l]=e[u],a=!0,s=0;s<n.length;s++)(!1&l||i>=l)&&Object.keys(r.O).every((e=>r.O[e](n[s])))?n.splice(s--,1):(a=!1,l<i&&(i=l));if(a){e.splice(u--,1);var c=o();void 0!==c&&(t=c)}}return t}l=l||0;for(var u=e.length;u>0&&e[u-1][2]>l;u--)e[u]=e[u-1];e[u]=[n,o,l]},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={416:0,719:0};r.O.j=t=>0===e[t];var t=(t,n)=>{var o,l,[i,a,s]=n,c=0;if(i.some((t=>0!==e[t]))){for(o in a)r.o(a,o)&&(r.m[o]=a[o]);if(s)var u=s(r)}for(t&&t(n);c<i.length;c++)l=i[c],r.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return r.O(u)},n=globalThis.webpackChunkoik=globalThis.webpackChunkoik||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var o=r.O(void 0,[719],(()=>r(329)));o=r.O(o)})();