import { __name } from './chunk-6AXVLTU5.js';
import { LogLevelLabel } from '@storm-software/config-tools/types';

async function finalize(log, context, hooks) {
  await hooks.callHook("finalize:begin", context).catch((error) => {
    log(LogLevelLabel.ERROR, `An error occured while starting the finalize process for the Storm Stack project: ${error.message} 
${error.stack ?? ""}`);
    throw new Error("An error occured while starting the finalize process for the Storm Stack project", {
      cause: error
    });
  });
  await hooks.callHook("finalize:complete", context).catch((error) => {
    log(LogLevelLabel.ERROR, `An error occured while finishing the finalize process for the Storm Stack project: ${error.message} 
${error.stack ?? ""}`);
    throw new Error("An error occured while finishing the finalize process for the Storm Stack project", {
      cause: error
    });
  });
}
__name(finalize, "finalize");

export { finalize };
//# sourceMappingURL=chunk-7BAKVZ2Q.js.map
//# sourceMappingURL=chunk-7BAKVZ2Q.js.map