"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateSeedMigrationTypes = generateSeedMigrationTypes;
const generator_1 = require("@postxl/generator");
function generateSeedMigrationTypes(context) {
    const imports = generator_1.ImportGenerator
        //
        .from(context.seedData.migrationTypes.summary.location)
        .addType(context.actions.summary.action);
    const { migrationTypes: { summary, base, excel, excelSeed, customAction }, } = context.seedData;
    return /* ts */ `
${imports.generate()}

export type ${summary.name} = ${excelSeed.name} | ${excel.name} | ${customAction.name}

export type ${base.name}<Type extends string> = {
  type: Type
  name: string
  order: number
  description?: string
}

/**
 * Executes an Excel import (without detecting/handling delta)
 */
export type ${excelSeed.name} = ${base.name}<'${excelSeed.discriminant}'> & {
  filename: string
}

/**
 * Executes an Excel import (with detecting/handling delta)
 */
export type ${excel.name} = ${base.name}<'${excel.discriminant}'> & {
  filename: string
}

/**
 * Executes a custom action
 */
export type ${customAction.name} = ${base.name}<'${customAction.discriminant}'> & {
  action: Action
}`;
}
//# sourceMappingURL=seed-migration-types.generator.js.map