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 b=window.React,g=Symbol.for("react.element"),x=Symbol.for("react.fragment"),v=Object.prototype.hasOwnProperty,f=b.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,j={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)v.call(e,n)&&!j.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:g,type:o,key:s,ref:i,props:r,_owner:f.current}}d.Fragment=x;d.jsx=w;d.jsxs=w;_.exports=d;var t=_.exports;const{useSelect:B}=window.wp.data,l=o=>({metaValue:B(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:T}=window.wp.components,{templates:k}=window.brandyBlockEditorData.footer_settings,P=[{label:"Inherit",value:"inherit"},...k.map(({settings:{name:o},id:e})=>({label:o,value:e}))];function C(){const{metaValue:o,setMetaValue:e}=l("_brandy_post_footer_template"),a=n=>{e(n)};return t.jsx(T,{title:p("Footer Template"),children:t.jsxs("div",{children:[t.jsx(y,{options:P,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:E}=window.wp.components,{templates:R}=window.brandyBlockEditorData.header_settings,S=[{label:"Inherit",value:"inherit"},...R.map(({settings:{name:o},id:e})=>({label:o,value:e}))];function V(){const{metaValue:o,setMetaValue:e}=l("_brandy_post_header_template"),a=n=>{e(n)};return t.jsx(E,{title:u("Header Template"),children:t.jsxs("div",{children:[t.jsx(y,{options:S,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:$,Button:O}=window.wp.components;function h({options:o=[],selected:e,onChange:a,className:n=""}){const r=s=>{a(s)};return t.jsx($,{className:`brandy-post-editor-btn-group ${n}`,children:o.map(s=>t.jsx(O,{onClick:()=>{r(s.value)},className:e===s.value?"selected":"",children:s.label},s.value))})}const{__:c}=window.wp.i18n,{PanelBody:D,RangeControl:I}=window.wp.components,M=[{label:"Inherit",value:"inherit"},{label:"Enable",value:"enable"},{label:"Disable",value:"disable"}],z=[{label:"Inherit",value:"inherit"},{label:"Custom",value:"custom"}],m={type:"inherit",value:0};function A(){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(D,{title:"Header Transparent",children:t.jsxs("div",{children:[t.jsx("div",{style:{marginBottom:10},children:c("Transparent options","brandy")}),t.jsx(h,{options:M,selected:o??"inherit",onChange:e}),t.jsx("div",{style:{marginTop:20,marginBottom:10},children:c("Blur background","brandy")}),t.jsx(h,{options:z,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(I,{value:(a==null?void 0:a.value)??3,onChange:s,step:.1,min:0,max:30})]})]})})}const{registerPlugin:F}=window.wp.plugins,{__:H}=window.wp.i18n,{PluginSidebar:N}=window.wp.editPost??window.wp.editSite,q=()=>t.jsxs(N,{name:"brandy-page-settings",title:H("Brandy page settings","brandy"),children:[t.jsx(A,{}),t.jsx(V,{}),t.jsx(C,{})]});F("brandy",{render:q});