(()=>{"use strict";const t=window.wp.element,e=window.wp.i18n,o=window.wp.hooks,a=window.wp.data,l=window.wp.primitives,n=(0,t.createElement)(l.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,t.createElement)(l.Path,{fillRule:"evenodd",d:"M16.83 6.342l.602.3.625-.25.443-.176v12.569l-.443-.178-.625-.25-.603.301-1.444.723-2.41-.804-.475-.158-.474.158-2.41.803-1.445-.722-.603-.3-.625.25-.443.177V6.215l.443.178.625.25.603-.301 1.444-.722 2.41.803.475.158.474-.158 2.41-.803 1.445.722zM20 4l-1.5.6-1 .4-2-1-3 1-3-1-2 1-1-.4L5 4v17l1.5-.6 1-.4 2 1 3-1 3 1 2-1 1 .4 1.5.6V4zm-3.5 6.25v-1.5h-8v1.5h8zm0 3v-1.5h-8v1.5h8zm-8 3v-1.5h8v1.5h-8z",clipRule:"evenodd"})),c=window.wp.components,r=()=>{const l=(0,a.useSelect)((t=>t("core/editor").getEditedPostAttribute("meta")||{})),n=(0,a.useDispatch)("core/editor");let r=[];return r=(0,o.applyFilters)("oceanwp.postSetting.callout.controls",r),(0,t.createElement)("div",{className:"ocean-post-settings-container"},(0,t.createElement)("div",{className:"settings-footer-callout"},(0,t.createElement)(c.BaseControl,{__nextHasNoMarginBottom:!0},(0,t.createElement)(c.ButtonGroup,{className:"ocean-component-button-group"},(0,t.createElement)("div",{className:"ocean-component-button-group--label ocean-component-label"},(0,e.__)("Display Callout","ocean-footer-callout")),(0,t.createElement)("div",{className:"ocean-component-button-group__buttons"},(0,t.createElement)(c.Button,{variant:""===l.ofc_meta_disable_footer_callout?"primary":"secondary",onClick:()=>{n.editPost({meta:{ofc_meta_disable_footer_callout:""}})}},(0,e.__)("Default","ocean-footer-callout")),(0,t.createElement)(c.Button,{variant:"enable"===l.ofc_meta_disable_footer_callout?"primary":"secondary",onClick:()=>{n.editPost({meta:{ofc_meta_disable_footer_callout:"enable"}})}},(0,e.__)("Enable","ocean-footer-callout")),(0,t.createElement)(c.Button,{variant:"on"===l.ofc_meta_disable_footer_callout?"primary":"secondary",onClick:()=>{n.editPost({meta:{ofc_meta_disable_footer_callout:"on"}})}},(0,e.__)("Disable","ocean-footer-callout"))))),(0,t.createElement)(c.TextControl,{key:"ofc_meta_callout_button_url",label:(0,e.__)("Callout Button Url","ocean-footer-callout"),value:l.ofc_meta_callout_button_url,onChange:t=>{n.editPost({meta:{ofc_meta_callout_button_url:t}})},__nextHasNoMarginBottom:!0}),(0,t.createElement)(c.TextControl,{key:"ofc_meta_callout_button_txt",label:(0,e.__)("Callout Button Text","ocean-footer-callout"),value:l.ofc_meta_callout_button_txt,onChange:t=>{n.editPost({meta:{ofc_meta_callout_button_txt:t}})},__nextHasNoMarginBottom:!0}),(0,t.createElement)(c.TextareaControl,{label:(0,e.__)("Callout Text","ocean-footer-callout"),help:(0,e.__)("Override the default callout text.","ocean-footer-callout"),value:l.ofc_meta_callout_text,onChange:t=>{n.editPost({meta:{ofc_meta_callout_text:t}})},__nextHasNoMarginBottom:!0})),r&&Object.entries(r).map((([e,o])=>(0,t.createElement)("div",{key:e,className:o.class},o.content))),(0,o.doAction)("oceanwp.postSetting.callout.registeredControls",r))};(0,o.addFilter)("oceanwp.postSetting.registerModule","oceanwp.postSetting.module",(function(e){return e.callout={title:"Footer Callout",class:"ocean-setting-callout",panelClass:"ocean-setting-panel is-addon",initialOpen:!1,icon:n,postType:"all",category:"addon",priority:160,content:(0,t.createElement)(r,null)},e}))})();