var w={exports:{}},d={};/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var g=window.React,x=Symbol.for("react.element"),v=Symbol.for("react.fragment"),f=Object.prototype.hasOwnProperty,j=g.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,B={key:!0,ref:!0,__self:!0,__source:!0};function _(o,e,a){var t,s={},r=null,i=null;a!==void 0&&(r=""+a),e.key!==void 0&&(r=""+e.key),e.ref!==void 0&&(i=e.ref);for(t in e)f.call(e,t)&&!B.hasOwnProperty(t)&&(s[t]=e[t]);if(o&&o.defaultProps)for(t in e=o.defaultProps,e)s[t]===void 0&&(s[t]=e[t]);return{$$typeof:x,type:o,key:r,ref:i,props:s,_owner:j.current}}d.Fragment=v;d.jsx=_;d.jsxs=_;w.exports=d;var n=w.exports;const{useSelect:P}=window.wp.data,l=o=>({metaValue:P(t=>t("core/editor")==null||t("core/editor").getEditedPostAttribute("meta")==null?!1:t("core/editor").getEditedPostAttribute("meta")[o],[o]),setMetaValue:t=>{window.wp.data.dispatch("core/editor").editPost({meta:{[o]:t}})}});function y({options:o=[],selected:e,onChange:a}){const t=s=>{a(s.target.value)};return n.jsx("select",{className:"brandy-editor-select",value:e,onChange:t,onfocus:"this.size=10;",onblur:"this.size=1;",children:o.map((s,r)=>n.jsx("option",{value:s.value,children:s.label},r))})}const{__:u}=window.wp.i18n,{PanelBody:T}=window.wp.components,{templates:k}=window.brandyBlockEditorFooterSettings??{templates:[]},C=[{label:"Inherit",value:"inherit"},...k.map(({settings:{name:o},id:e})=>({label:o,value:e}))];function E(){const{metaValue:o,setMetaValue:e}=l("_brandy_post_footer_template"),a=t=>{e(t)};return n.jsx(T,{title:u("Footer Template"),children:n.jsxs("div",{children:[n.jsx(y,{options:C,selected:o??"inherit",onChange:a}),n.jsx("a",{style:{marginTop:10,display:"inline-block"},href:window.brandyBlockEditorData.links.customizer+"?action=brandy_quick_setting&panel=footer",children:u("Add your custom footer")})]})})}const{__:p}=window.wp.i18n,{PanelBody:S}=window.wp.components,{templates:$}=window.brandyBlockEditorHeaderSettings??{templates:[]},R=[{label:"Inherit",value:"inherit"},...$.map(({settings:{name:o},id:e})=>({label:o,value:e}))];function V(){const{metaValue:o,setMetaValue:e}=l("_brandy_post_header_template"),a=t=>{e(t)};return n.jsx(S,{title:p("Header Template"),children:n.jsxs("div",{children:[n.jsx(y,{options:R,selected:o??"inherit",onChange:a}),n.jsx("a",{style:{marginTop:10,display:"inline-block"},href:window.brandyBlockEditorData.links.customizer+"?action=brandy_quick_setting&panel=header",children:p("Add your custom header")})]})})}const{ButtonGroup:M,Button:O}=window.wp.components;function h({options:o=[],selected:e,onChange:a,className:t=""}){const s=r=>{a(r)};return n.jsx(M,{className:`brandy-post-editor-btn-group ${t}`,children:o.map(r=>n.jsx(O,{onClick:()=>{s(r.value)},className:e===r.value?"selected":"",children:r.label},r.value))})}const{__:c}=window.wp.i18n,{PanelBody:I,RangeControl:A}=window.wp.components,D=[{label:"Inherit",value:"inherit"},{label:"Enable",value:"enable"},{label:"Disable",value:"disable"}],F=[{label:"Inherit",value:"inherit"},{label:"Custom",value:"custom"}],m={type:"inherit",value:0};function H(){const{metaValue:o,setMetaValue:e}=l("_brandy_post_header_transparent"),{metaValue:a,setMetaValue:t}=l("_brandy_post_header_blur_background"),s=i=>{t({...a??m,type:i})},r=i=>{t({...a??m,value:i})};return n.jsx(I,{title:"Header Transparent",children:n.jsxs("div",{children:[n.jsx("div",{style:{marginBottom:10},children:c("Transparent options","brandy")}),n.jsx(h,{options:D,selected:o??"inherit",onChange:e}),n.jsx("div",{style:{marginTop:20,marginBottom:10},children:c("Blur background","brandy")}),n.jsx(h,{options:F,selected:(a==null?void 0:a.type)??"inherit",onChange:s}),(a==null?void 0:a.type)=="custom"&&n.jsxs("div",{style:{marginTop:20},children:[n.jsx("div",{style:{marginBottom:10},children:c("Blur value (px)","brandy")}),n.jsx(A,{value:(a==null?void 0:a.value)??3,onChange:r,step:.1,min:0,max:30})]})]})})}const{registerPlugin:z}=window.wp.plugins,{__:N}=window.wp.i18n,{PluginSidebar:b}=window.wp.editSite??window.wp.editPost??{},{useSelect:q}=window.wp.data,G=()=>q(e=>e("core/editor").getEditedPostAttribute("meta"),[])?n.jsxs(b,{name:"brandy-page-settings",title:N("Brandy page settings","brandy"),children:[n.jsx(H,{}),n.jsx(V,{}),n.jsx(E,{})]}):!1;b&&z("brandy",{render:G});
