import{r as o}from"./wp-i18n-shim-DUX0OV_V.js";function d(){return o.useCallback(({onSelect:e,title:a="Select Media",multiple:i=!1,libraryType:r=["image"]})=>{if(typeof wp>"u"||typeof wp.media>"u")return;const t=wp.media({title:a,button:{text:"Use this"},multiple:i,library:{type:r}});t.on("select",()=>{const s=t.state().get("selection").first().toJSON();e==null||e(s)}),t.open()},[])}export{d as u};
//# sourceMappingURL=useMediaUploader-DCuR6epV.js.map
