import{logger as p}from"../../server/tools/notifiers/logger.js";import s from"./ejectTheme.js";import h from"./ejectComponent.js";import f from"./resolveEjectParams.js";async function u(c){const e=await f(c);if(!e)return;const{objectType:n,pathToThemeFolder:t,pathToPortalCustomThemeFolder:o,componentToEject:i,theme:r,options:a}=e;try{switch(n){case"component":await h({pathToThemeFolder:t,pathToPortalCustomThemeFolder:o,componentToEject:i,theme:r},a);break;case"theme":await s({pathToThemeFolder:t,pathToPortalCustomThemeFolder:o,theme:r},a);break;default:break}}catch(m){m&&p.error(m)}}export{u as eject};
