var _={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 w(o,e,a){var n,r={},s=null,i=null;a!==void 0&&(s=""+a),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(i=e.ref);for(n in e)f.call(e,n)&&!B.hasOwnProperty(n)&&(r[n]=e[n]);if(o&&o.defaultProps)for(n in e=o.defaultProps,e)r[n]===void 0&&(r[n]=e[n]);return{$$typeof:x,type:o,key:s,ref:i,props:r,_owner:j.current}}d.Fragment=v;d.jsx=w;d.jsxs=w;_.exports=d;var t=_.exports;const{useSelect:T}=window.wp.data,l=o=>({metaValue:T(n=>n("core/editor").getEditedPostAttribute("meta")[o],[o]),setMetaValue:n=>{window.wp.data.dispatch("core/editor").editPost({meta:{[o]:n}})}});function y({options:o=[],selected:e,onChange:a}){const n=r=>{a(r.target.value)};return t.jsx("select",{className:"brandy-editor-select",value:e,onChange:n,onfocus:"this.size=10;",onblur:"this.size=1;",children:o.map((r,s)=>t.jsx("option",{value:r.value,children:r.label},s))})}const{__:p}=window.wp.i18n,{PanelBody:k}=window.wp.components,{templates:P}=window.brandyBlockEditorData.footer_settings,C=[{label:"Inherit",value:"inherit"},...P.map(({settings:{name:o},id:e})=>({label:o,value:e}))];function E(){const{metaValue:o,setMetaValue:e}=l("_brandy_post_footer_template"),a=n=>{e(n)};return t.jsx(k,{title:p("Footer Template"),children:t.jsxs("div",{children:[t.jsx(y,{options:C,selected:o??"inherit",onChange:a}),t.jsx("a",{style:{marginTop:10,display:"inline-block"},href:window.brandyBlockEditorData.links.customizer+"?action=brandy_quick_setting&panel=footer",children:p("Add your custom footer")})]})})}const{__:u}=window.wp.i18n,{PanelBody:R}=window.wp.components,{templates:S}=window.brandyBlockEditorData.header_settings,V=[{label:"Inherit",value:"inherit"},...S.map(({settings:{name:o},id:e})=>({label:o,value:e}))];function $(){const{metaValue:o,setMetaValue:e}=l("_brandy_post_header_template"),a=n=>{e(n)};return t.jsx(R,{title:u("Header Template"),children:t.jsxs("div",{children:[t.jsx(y,{options:V,selected:o??"inherit",onChange:a}),t.jsx("a",{style:{marginTop:10,display:"inline-block"},href:window.brandyBlockEditorData.links.customizer+"?action=brandy_quick_setting&panel=header",children:u("Add your custom header")})]})})}const{ButtonGroup:O,Button:D}=window.wp.components;function h({options:o=[],selected:e,onChange:a,className:n=""}){const r=s=>{a(s)};return t.jsx(O,{className:`brandy-post-editor-btn-group ${n}`,children:o.map(s=>t.jsx(D,{onClick:()=>{r(s.value)},className:e===s.value?"selected":"",children:s.label},s.value))})}const{__:c}=window.wp.i18n,{PanelBody:I,RangeControl:M}=window.wp.components,z=[{label:"Inherit",value:"inherit"},{label:"Enable",value:"enable"},{label:"Disable",value:"disable"}],A=[{label:"Inherit",value:"inherit"},{label:"Custom",value:"custom"}],m={type:"inherit",value:0};function F(){const{metaValue:o,setMetaValue:e}=l("_brandy_post_header_transparent"),{metaValue:a,setMetaValue:n}=l("_brandy_post_header_blur_background"),r=i=>{n({...a??m,type:i})},s=i=>{n({...a??m,value:i})};return t.jsx(I,{title:"Header Transparent",children:t.jsxs("div",{children:[t.jsx("div",{style:{marginBottom:10},children:c("Transparent options","brandy")}),t.jsx(h,{options:z,selected:o??"inherit",onChange:e}),t.jsx("div",{style:{marginTop:20,marginBottom:10},children:c("Blur background","brandy")}),t.jsx(h,{options:A,selected:(a==null?void 0:a.type)??"inherit",onChange:r}),(a==null?void 0:a.type)=="custom"&&t.jsxs("div",{style:{marginTop:20},children:[t.jsx("div",{style:{marginBottom:10},children:c("Blur value (px)","brandy")}),t.jsx(M,{value:(a==null?void 0:a.value)??3,onChange:s,step:.1,min:0,max:30})]})]})})}const{registerPlugin:H}=window.wp.plugins,{__:N}=window.wp.i18n,{PluginSidebar:b}=window.wp.editPost??window.wp.editSite??{},q=()=>t.jsxs(b,{name:"brandy-page-settings",title:N("Brandy page settings","brandy"),children:[t.jsx(F,{}),t.jsx($,{}),t.jsx(E,{})]});b&&H("brandy",{render:q});