(()=>{"use strict";var s,e={998:()=>{const s=window.wp.blocks,e=window.wp.i18n,i=window.wp.blockEditor,r=window.wp.components,o=window.ReactJSXRuntime,a=JSON.parse('{"UU":"custom/session-categories"}');(0,s.registerBlockType)(a.UU,{edit:function({attributes:s,setAttributes:a}){const{categories:t,description:n}=s;return(0,o.jsxs)("div",{...(0,i.useBlockProps)(),children:[(0,o.jsx)(i.InspectorControls,{children:(0,o.jsxs)(r.PanelBody,{title:(0,e.__)("Session Categories Settings","session-categories"),children:[t.map(((s,i)=>(0,o.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,o.jsx)(r.TextControl,{label:(0,e.__)("Category Title","session-categories"),value:s.title,onChange:s=>((s,e)=>{const i=[...t];i[s].title=e,a({categories:i})})(i,s)}),(0,o.jsx)(r.TextControl,{label:(0,e.__)("Category Image URL","session-categories"),value:s.imageUrl,onChange:s=>((s,e)=>{const i=[...t];i[s].imageUrl=e,a({categories:i})})(i,s)})]},i))),(0,o.jsx)(r.TextControl,{label:(0,e.__)("Description","session-categories"),value:n,onChange:s=>a({description:s})})]})}),(0,o.jsxs)("section",{className:"session-categories",children:[(0,o.jsx)("div",{className:"session-categories__grid",children:t.map(((s,e)=>(0,o.jsxs)("div",{className:"session-card",children:[(0,o.jsx)("img",{className:"session-card__image",src:s.imageUrl,alt:s.alt}),(0,o.jsx)("div",{className:"session-card__overlay",children:(0,o.jsx)("h3",{className:"session-card__title",children:s.title})})]},e)))}),(0,o.jsx)("div",{className:"session-categories__description",children:(0,o.jsx)("p",{className:"session-categories__text",children:n})})]})]})},save:function({attributes:s}){const{categories:e,description:r}=s;return(0,o.jsxs)("section",{...i.useBlockProps.save(),className:"session-categories",children:[(0,o.jsx)("div",{className:"session-categories__grid",children:e.map(((s,e)=>(0,o.jsxs)("div",{className:"session-card",children:[(0,o.jsx)("img",{className:"session-card__image",src:s.imageUrl,alt:s.alt}),(0,o.jsx)("div",{className:"session-card__overlay",children:(0,o.jsx)("h3",{className:"session-card__title",children:s.title})})]},e)))}),(0,o.jsx)("div",{className:"session-categories__description",children:(0,o.jsx)("p",{className:"session-categories__text",children:r})})]})}})}},i={};function r(s){var o=i[s];if(void 0!==o)return o.exports;var a=i[s]={exports:{}};return e[s](a,a.exports,r),a.exports}r.m=e,s=[],r.O=(e,i,o,a)=>{if(!i){var t=1/0;for(d=0;d<s.length;d++){i=s[d][0],o=s[d][1],a=s[d][2];for(var n=!0,c=0;c<i.length;c++)(!1&a||t>=a)&&Object.keys(r.O).every((s=>r.O[s](i[c])))?i.splice(c--,1):(n=!1,a<t&&(t=a));if(n){s.splice(d--,1);var l=o();void 0!==l&&(e=l)}}return e}a=a||0;for(var d=s.length;d>0&&s[d-1][2]>a;d--)s[d]=s[d-1];s[d]=[i,o,a]},r.o=(s,e)=>Object.prototype.hasOwnProperty.call(s,e),(()=>{var s={57:0,350:0};r.O.j=e=>0===s[e];var e=(e,i)=>{var o,a,t=i[0],n=i[1],c=i[2],l=0;if(t.some((e=>0!==s[e]))){for(o in n)r.o(n,o)&&(r.m[o]=n[o]);if(c)var d=c(r)}for(e&&e(i);l<t.length;l++)a=t[l],r.o(s,a)&&s[a]&&s[a][0](),s[a]=0;return r.O(d)},i=self.webpackChunksession_categories=self.webpackChunksession_categories||[];i.forEach(e.bind(null,0)),i.push=e.bind(null,i.push.bind(i))})();var o=r.O(void 0,[350],(()=>r(998)));o=r.O(o)})();