var E=Object.defineProperty;var p=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable;var i=(o,a,l)=>a in o?E(o,a,{enumerable:!0,configurable:!0,writable:!0,value:l}):o[a]=l,n=(o,a)=>{for(var l in a||(a={}))S.call(a,l)&&i(o,l,a[l]);if(p)for(var l of p(a))B.call(a,l)&&i(o,l,a[l]);return o};import{useBlockProps as T,InspectorControls as H}from"../shims/wp-block-editor.js";import{PanelBody as m,ToggleControl as s,TextControl as h,SelectControl as u}from"../shims/wp-components.js";import{__ as e}from"../shims/wp-i18n.js";var d;const r=((d=window.wp)==null?void 0:d.blocks)||{};r.createBlock;const x=r.registerBlockType||(()=>null);r.unregisterBlockType;r.getBlockType;r.getBlockTypes;r.hasBlockSupport;r.isReusableBlock;r.isTemplatePart;r.cloneBlock;r.serialize;r.parse;r.pasteHandler;r.rawHandler;r.getBlockContent;r.getSaveContent;r.getSaveElement;r.getBlockDefaultClassName;var b;const k=((b=window.wp)==null?void 0:b.serverSideRender)||{},I=k.default||k||(()=>null),g=()=>React.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"24",height:"24"},React.createElement("path",{fill:"currentColor",d:"M3 6h18v2H3V6zm0 5h18v2H3v-2zm0 5h18v2H3v-2z"}),React.createElement("path",{fill:"currentColor",d:"M9 4l-2 2 2 2M15 4l2 2-2 2",opacity:"0.5"})),P=({attributes:o,setAttributes:a})=>{const l=T({className:"prorank-breadcrumbs-block-editor"}),{separator:y,homeText:v,showCurrent:f,showHome:c,homeIcon:w,style:R,displayStyle:C}=o;return React.createElement("div",n({},l),React.createElement(H,null,React.createElement(m,{title:e("Breadcrumb Settings","prorank-seo"),initialOpen:!0},React.createElement(s,{label:e("Show Home","prorank-seo"),checked:c,onChange:t=>a({showHome:t}),help:e("Display the home link at the start of breadcrumbs.","prorank-seo")}),c&&React.createElement(React.Fragment,null,React.createElement(h,{label:e("Home Text","prorank-seo"),value:v,onChange:t=>a({homeText:t}),help:e("Text to display for the home link.","prorank-seo")}),React.createElement(s,{label:e("Show Home Icon","prorank-seo"),checked:w,onChange:t=>a({homeIcon:t}),help:e("Display a home icon before the home text.","prorank-seo")})),React.createElement(s,{label:e("Show Current Page","prorank-seo"),checked:f,onChange:t=>a({showCurrent:t}),help:e("Display the current page title at the end.","prorank-seo")}),React.createElement(h,{label:e("Separator","prorank-seo"),value:y,onChange:t=>a({separator:t}),help:e("Character(s) to separate breadcrumb items.","prorank-seo")})),React.createElement(m,{title:e("Appearance","prorank-seo"),initialOpen:!1},React.createElement(u,{label:e("Separator Style","prorank-seo"),value:R,options:[{label:e("Default","prorank-seo"),value:"default"},{label:e("Arrow (→)","prorank-seo"),value:"arrow"},{label:e("Slash (/)","prorank-seo"),value:"slash"},{label:e("Pipe (|)","prorank-seo"),value:"pipe"},{label:e("Chevron (›)","prorank-seo"),value:"chevron"}],onChange:t=>a({style:t})}),React.createElement(u,{label:e("Display Style","prorank-seo"),value:C,options:[{label:e("Inline","prorank-seo"),value:"inline"},{label:e("With Background","prorank-seo"),value:"background"},{label:e("Compact","prorank-seo"),value:"compact"},{label:e("Large","prorank-seo"),value:"large"}],onChange:t=>a({displayStyle:t})}))),React.createElement(I,{block:"prorank-seo/breadcrumbs",attributes:o,EmptyResponsePlaceholder:()=>React.createElement("div",{className:"prorank-breadcrumbs-placeholder"},React.createElement(g,null),React.createElement("span",null,e("Breadcrumbs will appear here on the frontend.","prorank-seo")))}))};x("prorank-seo/breadcrumbs",{apiVersion:3,title:e("ProRank Breadcrumbs","prorank-seo"),description:e("Display navigational breadcrumbs with schema markup.","prorank-seo"),category:"prorank-seo",icon:g,keywords:[e("breadcrumbs","prorank-seo"),e("navigation","prorank-seo"),e("seo","prorank-seo"),e("schema","prorank-seo")],supports:{html:!1,align:!0},attributes:{separator:{type:"string",default:"›"},homeText:{type:"string",default:"Home"},showCurrent:{type:"boolean",default:!0},showHome:{type:"boolean",default:!0},homeIcon:{type:"boolean",default:!1},style:{type:"string",default:"default"},displayStyle:{type:"string",default:"inline"}},edit:P,save:()=>null});
