(()=>{var e,t={4966:(e,t,n)=>{"use strict";const a=window.wp.blocks,r=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"nexa/tab","version":"1.0.0","title":"Tab","category":"nexa-blocks","parent":["nexa/tabs"],"description":"Single tab for Tabs block","supports":{"html":false,"align":["wide","full"],"className":false,"customClassName":false},"example":{},"usesContext":["nexa/animation"],"textdomain":"nexa-blocks","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}'),o=window.React,i=window.wp.blockEditor,s=window.wp.element;window.wp.i18n;var l=n(6942),c=n.n(l);const u=window.wp.data,d=e=>"object"!=typeof e?"":[...new Set(e)].join(" "),{BlockIcons:b}=window?.nexaModules;(0,a.registerBlockType)(r,{icon:{src:b?.default.tab},attributes:{tabId:{type:"string"},parentTabId:{type:"string"},animation:{type:"string",default:""}},edit:e=>{const{attributes:t,setAttributes:n,clientId:a,context:r}=e,{uniqueId:l,animation:b,parentClassess:p,tabId:f,parentTabId:m}=t;(0,s.useEffect)((()=>{(({uniqueId:e,setAttributes:t,clientId:n})=>{const a="nexa-blocks-"+Math.random().toString(36).substr(2,8);if(!e)return void t({uniqueId:a});const r=(0,u.select)("core/block-editor").getBlocks();let o=!1;const i=r=>{if(!o)for(const s of r){const{innerBlocks:r}=s;if(s.attributes.uniqueId===e){if(s.clientId!==n)return t({uniqueId:a}),void(o=!0);r.length>0&&i(r)}else r.length>0&&i(r)}};i(r)})({uniqueId:l,setAttributes:n,clientId:a})}),[]);const v=(0,i.useBlockProps)({className:c()(l,d(p),"tab-item",{show:"1"==f})});return(0,s.useEffect)((()=>{n({animation:r["nexa/animation"]})}),[r]),(0,o.createElement)(s.Fragment,null,(0,o.createElement)("div",{...v,"data-tab":f,"data-tab-parent-id":m,role:"tabpanel","aria-labelledby":`tab-title-${f}`,id:`tab-content-${f}`,"aria-hidden":"1"==f?"false":"true"},(0,o.createElement)(i.InnerBlocks,{templateLock:!1,template:[["core/paragraph",{}]]})))},save:e=>{const{attributes:t}=e,{uniqueId:n,parentClassess:a,tabId:r,parentTabId:s,animation:l}=t,u=i.useBlockProps.save({className:c()("wp-block-nexa-tab",n,d(a),"tab-item",{show:"1"===r,[l]:l&&""!==l})});return(0,o.createElement)("div",{...u,"data-tab":r,"data-tab-parent-id":s,role:"tabpanel","aria-labelledby":`tab-title-${r}`,id:`tab-content-${r}`,"aria-hidden":"1"===r?"false":"true"},(0,o.createElement)(i.InnerBlocks.Content,null))}})},6942:(e,t)=>{var n;!function(){"use strict";var a={}.hasOwnProperty;function r(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,o(n)))}return e}function o(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return r.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)a.call(e,n)&&e[n]&&(t=i(t,n));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()}},n={};function a(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,a),o.exports}a.m=t,e=[],a.O=(t,n,r,o)=>{if(!n){var i=1/0;for(u=0;u<e.length;u++){for(var[n,r,o]=e[u],s=!0,l=0;l<n.length;l++)(!1&o||i>=o)&&Object.keys(a.O).every((e=>a.O[e](n[l])))?n.splice(l--,1):(s=!1,o<i&&(i=o));if(s){e.splice(u--,1);var c=r();void 0!==c&&(t=c)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o]},a.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return a.d(t,{a:t}),t},a.d=(e,t)=>{for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},a.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={5392:0,8888:0};a.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,[i,s,l]=n,c=0;if(i.some((t=>0!==e[t]))){for(r in s)a.o(s,r)&&(a.m[r]=s[r]);if(l)var u=l(a)}for(t&&t(n);c<i.length;c++)o=i[c],a.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return a.O(u)},n=globalThis.webpackChunknexa_blocks=globalThis.webpackChunknexa_blocks||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var r=a.O(void 0,[8888],(()=>a(4966)));r=a.O(r)})();