var g=Object.defineProperty;var n=Object.getOwnPropertySymbols;var u=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable;var l=(o,e,a)=>e in o?g(o,e,{enumerable:!0,configurable:!0,writable:!0,value:a}):o[e]=a,s=(o,e)=>{for(var a in e||(e={}))u.call(e,a)&&l(o,a,e[a]);if(n)for(var a of n(e))d.call(e,a)&&l(o,a,e[a]);return o};import{r as k,S as h}from"../server-side-render-qGFKBtC_.js";import{useBlockProps as v,InspectorControls as y}from"../shims/wp-block-editor.js";import{PanelBody as R,TextControl as f,RangeControl as b,SelectControl as E}from"../shims/wp-components.js";import{__ as t}from"../shims/wp-i18n.js";const x=()=>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:"M10 3h11v2H10zm0 4h11v2H10zm0 4h11v2H10zm0 4h11v2H10zM3 4h5v16H3z"})),C=({attributes:o,setAttributes:e,name:a})=>{const i=v({className:"prorank-related-content-editor"}),{heading:c,maxLinks:p,layout:m}=o;return React.createElement("div",s({},i),React.createElement(y,null,React.createElement(R,{title:t("Subpages","prorank-seo"),initialOpen:!0},React.createElement(f,{label:t("Heading","prorank-seo"),value:c,onChange:r=>e({heading:r})}),React.createElement(b,{label:t("Maximum links","prorank-seo"),min:1,max:12,value:p,onChange:r=>e({maxLinks:Math.max(1,Math.min(12,r||1))})}),React.createElement(E,{label:t("Layout","prorank-seo"),value:m,onChange:r=>e({layout:r}),options:[{value:"list",label:t("List","prorank-seo")},{value:"grid",label:t("Compact grid","prorank-seo")}]}))),React.createElement(h,{block:a,attributes:o}))};k("prorank-seo/subpages",{apiVersion:3,title:t("ProRank Subpages","prorank-seo"),description:t("Lists direct child pages of the current page.","prorank-seo"),category:"prorank-seo",icon:x,keywords:[t("subpages","prorank-seo"),t("children","prorank-seo"),t("navigation","prorank-seo")],supports:{html:!1,align:!0},attributes:{heading:{type:"string",default:t("In This Section","prorank-seo")},maxLinks:{type:"number",default:5},layout:{type:"string",default:"list"},className:{type:"string",default:""}},edit:C,save:()=>null});
