!function(){"use strict";var e=window.wp.components,t=window.wp.data,o=window.wp.element,a=window.wp.compose,i=window.wp.hooks;let r=!1;class n extends React.Component{render(){const{meta:t,isNew:a,updateHideFeaturedImage:i,getValue:r}=this.props;return(0,o.createElement)(o.Fragment,null,(0,o.createElement)(e.PanelRow,null,(0,o.createElement)(e.CheckboxControl,{label:cybocfiL10n.featuredImageCheckboxLabel,checked:r(a,t),onChange:e=>{this.setState({isChecked:e}),i(e,t)}})))}}const d=(0,a.compose)([(0,a.withState)((e=>e)),(0,t.withSelect)((e=>({meta:{...e("core/editor").getCurrentPostAttribute("meta"),...e("core/editor").getEditedPostAttribute("meta")},isNew:e("core/editor").isEditedPostNew}))),(0,t.withDispatch)((e=>({updateHideFeaturedImage(t,o){t=t?"yes":"",o={...o,cybocfi_hide_featured_image:t},e("core/editor").editPost({meta:o})},getValue(e,t){return e()&&!r?(r=!0,this.updateHideFeaturedImage(cybocfi.hideByDefault,t),cybocfi.hideByDefault):t.cybocfi_hide_featured_image}})))])(n);(0,i.addFilter)("editor.PostFeaturedImage","cybocfi/addControl",(function(e){return function(t){return(0,o.createElement)(o.Fragment,{},null,(0,o.createElement)(e,t),(0,o.createElement)(d))}}))}();