(()=>{"use strict";const e=window.wp.hooks,t=window.wp.components,a=window.wp.data,i=window.wp.element,o=window.wp.compose,n=window.wp.i18n,s=window.ReactJSXRuntime;class l extends i.Component{render(){const{meta:e,updateFeaturedImagePosition:a}=this.props;return(0,s.jsx)(t.RadioControl,{label:(0,n.__)("Featured Image Position"),selected:e.newspack_featured_image_position,options:[{label:(0,n.__)("Default (set in Customizer)","newspack"),value:""},{label:(0,n.__)("Large","newspack"),value:"large"},{label:(0,n.__)("Small","newspack"),value:"small"},{label:(0,n.__)("Behind article title","newspack"),value:"behind"},{label:(0,n.__)("Beside article title","newspack"),value:"beside"},{label:(0,n.__)("Above article title","newspack"),value:"above"},{label:(0,n.__)("Hidden","newspack"),value:"hidden"}],onChange:t=>{this.setState({value:t}),a(t,e)}})}}const r=(0,o.compose)([(0,a.withSelect)((e=>{const{getCurrentPostAttribute:t,getEditedPostAttribute:a}=e("core/editor");return{meta:{...t("meta"),...a("meta")}}})),(0,a.withDispatch)((e=>({updateFeaturedImagePosition(t,a){a={...a,newspack_featured_image_position:t},e("core/editor").editPost({meta:a})}})))])(l);(0,e.addFilter)("editor.PostFeaturedImage","enhance-featured-image/featured-image-position-control",(e=>t=>{const o=(0,a.select)("core/editor").getCurrentPostType();return newspack_theme_featured_image_post_types.includes(o)?(0,s.jsxs)(i.Fragment,{children:[(0,s.jsx)(e,{...t}),(0,s.jsx)(r,{})]}):(0,s.jsx)(e,{...t})}))})();