import{B as e,C as t,L as n,S as r,pt as i,y as a}from"./vue.esm-bundler-DcNPjsgv.js";import{h as o,t as s}from"./js/plugin-main-js-file-B1a1bVnR.js";var c=o(`image-up`,[[`path`,{d:`M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21`,key:`9csbqa`}],[`path`,{d:`m14 19.5 3-3 3 3`,key:`9vmjn0`}],[`path`,{d:`M17 22v-5.5`,key:`1aa6fl`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),l=s({__name:`MediaButton`,emits:[`onMediaSelected`],setup(o,{emit:s}){let l=null,u=s,d=()=>{l?.open()};return n(()=>{!typeof window.wp.media!==`function`&&(l=window.wp.media({title:`Select or Upload Media`,button:{text:`Use this image`},multiple:!1}),l.on(`select`,()=>{u(`onMediaSelected`,l.state().get(`selection`).toJSON())}))}),(n,o)=>(e(),a(`button`,{type:`button`,class:`bmc-media-btn`,onClick:d},[t(i(c),{size:14}),o[0]||=r(` Upload Image `)]))}},[[`__scopeId`,`data-v-f3d42902`]]);export{l as t};