(()=>{"use strict";const e=window.wp.blocks,t=JSON.parse('{"UU":"jetix-store-toolkit/wishlist"}'),i=window.wp.blockEditor,o=window.wp.i18n,n=window.ReactJSXRuntime,s="#008710",r="rgba(0,135,16,0.08)",l={wrap:{position:"relative",display:"block",padding:"20px 20px 20px 24px",background:"#fafafa",border:"1px solid #e2e2e4",borderLeft:`3px solid ${s}`,borderRadius:"6px",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',userSelect:"none"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"10px",marginBottom:"6px"},titleRow:{display:"flex",alignItems:"center",gap:"10px"},iconWrap:{display:"flex",alignItems:"center",justifyContent:"center",width:"28px",height:"28px",background:r,borderRadius:"6px",color:s,flexShrink:0},title:{margin:0,fontSize:"13px",fontWeight:600,lineHeight:1.3,color:"#262626"},badge:{display:"inline-flex",alignItems:"center",padding:"2px 7px",background:r,border:`1px solid ${s}`,borderRadius:"20px",fontSize:"10px",fontWeight:700,letterSpacing:"0.04em",color:s,textTransform:"uppercase",flexShrink:0},description:{margin:0,fontSize:"12px",color:"#858586",lineHeight:1.5,paddingLeft:"38px"}};function d({title:e,description:t,icon:i}){return(0,n.jsxs)("div",{style:l.wrap,children:[(0,n.jsxs)("div",{style:l.header,children:[(0,n.jsxs)("div",{style:l.titleRow,children:[i&&(0,n.jsx)("div",{style:l.iconWrap,"aria-hidden":"true",children:i}),(0,n.jsx)("p",{style:l.title,children:e})]}),(0,n.jsx)("span",{style:l.badge,children:"STK"})]}),t&&(0,n.jsx)("p",{style:l.description,children:t})]})}const a="#5a4000",p={wrap:{marginTop:"10px",padding:"8px 12px",background:"#fff8e1",border:"1px solid #f5c842",borderRadius:"4px",fontSize:"12px",color:a,lineHeight:1.5},link:{color:a,fontWeight:600}};function c({moduleSlug:e,moduleLabel:t,secondarySlug:i,secondaryLabel:s}){const r=window.jwpStkBlocksData?.activeModules??[],l=!r.includes(e),d=i&&!r.includes(i);if(!l&&!d)return null;const a=window.jwpStkDashboard?.adminUrl?window.jwpStkDashboard.adminUrl+"admin.php?page=jwp-stk-modules":"#";return(0,n.jsxs)("div",{style:p.wrap,children:[l&&(0,n.jsxs)("p",{style:{margin:d?"0 0 4px":0},children:[(0,o.__)("The ","jetix-store-toolkit"),(0,n.jsx)("strong",{children:t}),(0,o.__)(" module is not active. ","jetix-store-toolkit"),(0,n.jsx)("a",{href:a,style:p.link,children:(0,o.__)("Enable it in Store Toolkit → Modules","jetix-store-toolkit")}),(0,o.__)(" for this block to display anything on the frontend.","jetix-store-toolkit")]}),d&&(0,n.jsxs)("p",{style:{margin:0},children:[(0,o.__)("The ","jetix-store-toolkit"),(0,n.jsx)("strong",{children:s}),(0,o.__)(" module must also be active for this block to work correctly.","jetix-store-toolkit")]})]})}const x=(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,n.jsx)("path",{d:"M21 8.25c0-2.485-2.099-4.5-4.688-4.5-1.935 0-3.597 1.126-4.312 2.733-.715-1.607-2.377-2.733-4.313-2.733C5.1 3.75 3 5.765 3 8.25c0 7.22 9 12 9 12s9-4.78 9-12z"})});(0,e.registerBlockType)(t.UU,{edit:function(){const e=(0,i.useBlockProps)();return(0,n.jsxs)("div",{...e,children:[(0,n.jsx)(d,{title:(0,o.__)("Wishlist","jetix-store-toolkit"),description:(0,o.__)("Displays the customer's wishlist. Rendered on the frontend.","jetix-store-toolkit"),icon:x}),(0,n.jsx)(c,{moduleSlug:"wishlist",moduleLabel:(0,o.__)("Wishlist","jetix-store-toolkit")})]})},save:()=>null})})();