import{r as o}from"./client-BbMi5ewG.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-lszBTVoc.js.map
