!function(){"use strict";var e,o=window.wp.blocks,n=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"atomic-wind/icon","title":"Icon","category":"atomic-wind","description":"An inline SVG icon from the Lucide icon set.","keywords":["icon","svg","lucide"],"textdomain":"atomic-wind","attributes":{"icon":{"type":"string","default":""}},"supports":{"anchor":true,"html":false,"color":false,"typography":false,"spacing":false},"render":"file:./render.php","editorScript":"file:./index.js"}'),t=window.wp.primitives,r=window.ReactJSXRuntime,i=(0,r.jsxs)(t.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,r.jsx)(t.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M20.3541 3.64593C18.5085 1.8004 13.2722 4.04455 8.65837 8.65837C4.04455 13.2722 1.8004 18.5085 3.64593 20.3541C5.49146 22.1996 10.7278 19.9555 15.3416 15.3416C19.9555 10.7278 22.1996 5.49146 20.3541 3.64593Z",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)(t.Path,{fillRule:"evenodd",clipRule:"evenodd",d:"M3.64593 3.64593C1.8004 5.49146 4.04455 10.7278 8.65837 15.3416C13.2722 19.9555 18.5085 22.1996 20.3541 20.3541C22.1996 18.5085 19.9555 13.2722 15.3416 8.65837C10.7278 4.04455 5.49146 1.8004 3.64593 3.64593Z",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)(t.Path,{d:"M12.009 12H12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),s=window.wp.blockEditor,l=window.wp.components,c=window.wp.i18n,d=window.wp.element;const{icons:a=[],iconsMap:p={}}=null!==(e=window.atomicWindIcons)&&void 0!==e?e:{};function u({name:e,size:o,isSelected:n,onClick:t}){const i=p[e]||"";return(0,r.jsx)("button",{type:"button",title:e,onClick:t,style:{background:n?"var(--wp-admin-theme-color, #007cba)":"transparent",border:"1px solid",borderColor:n?"transparent":"#ddd",borderRadius:"4px",cursor:"pointer",padding:"6px",color:n?"#fff":"currentColor",display:"flex",alignItems:"center",justifyContent:"center"},children:i&&(0,r.jsx)("svg",{width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",dangerouslySetInnerHTML:{__html:i}})})}const{name:h,...w}=n;(0,o.registerBlockType)(h,{...w,icon:i,edit:function({attributes:e,setAttributes:o}){const{icon:n}=e,[t,i]=(0,d.useState)(""),h=(0,s.useBlockProps)(),w=p[n]||"",k=(0,d.useMemo)((()=>{const e=t.trim().toLowerCase();return e?a.filter((o=>o.includes(e))):a}),[t]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.InspectorControls,{children:(0,r.jsxs)(l.PanelBody,{title:(0,c.__)("Icon","otter-blocks"),children:[(0,r.jsx)(l.SearchControl,{label:(0,c.__)("Search icons","otter-blocks"),value:t,onChange:i}),(0,r.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(6, 1fr)",gap:"4px",maxHeight:"300px",overflowY:"auto",marginTop:"8px"},children:k.slice(0,120).map((e=>(0,r.jsx)(u,{name:e,size:"20",isSelected:e===n,onClick:()=>o({icon:e})},e)))}),t&&k.length>120&&(0,r.jsx)("p",{style:{fontSize:"11px",color:"#757575",marginTop:"4px"},children:(0,c.__)("Showing first 120 results — refine your search.","otter-blocks")}),(0,r.jsxs)("p",{style:{margin:"12px 0 0",fontSize:"11px",color:"#757575",lineHeight:"1.4"},children:[(0,c.__)("Icons by","otter-blocks")," ",(0,r.jsx)("a",{href:"https://lucide.dev",target:"_blank",rel:"noopener noreferrer",children:"Lucide"})," - ",(0,c.__)("open-source icon library.","otter-blocks")]})]})}),n&&w?(0,r.jsx)("svg",{...h,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",dangerouslySetInnerHTML:{__html:w}}):(0,r.jsx)("div",{...h,style:{...h.style,opacity:.4,fontSize:"12px"},children:(0,c.__)("Select an icon in the sidebar.","otter-blocks")})]})},save:()=>null})}();