/**
 * commands/init-config-injection.ts — pure helpers for `ailf init`.
 *
 * Injects user-supplied owner/source values into the scaffolded config
 * templates by replacing a *commented* owner block (anchored) and the
 * named-source line. With no values supplied, every injector returns
 * its input unchanged — so `ailf init` output stays byte-identical to the
 * shipped template. Anchor drift is caught by init-config-injection.test.ts.
 *
 * Source handling: the template references the registered `production`
 * source by name. Supplied source values that all match the production
 * defaults keep the named reference (so the happy path never lands in the
 * `env-override` → `experimental` bucket, D0059); any diverging value
 * swaps the named line for an inline source block, with production
 * defaults filling the unsupplied fields.
 */
import type { RepoConfig, RepoSourceConfig } from "../_vendor/ailf-core/index.d.ts";
/** Values resolved from flags/prompts to write into the scaffolded config. */
export interface ConfigInjectionValues {
    team?: string;
    individual?: string;
    projectId?: string;
    dataset?: string;
    baseUrl?: string;
}
export declare const TS_OWNER_ANCHOR = "  // owner: {\n  //   team: \"docs\",\n  //   individual: \"you@sanity.io\",\n  // },";
export declare const YAML_OWNER_ANCHOR = "# owner:\n#   team: docs\n#   individual: you@sanity.io";
/** Placeholder team slug in the scaffolded GitHub Actions workflow env. */
export declare const WORKFLOW_OWNER_TEAM_ANCHOR = "AILF_OWNER_TEAM: \"<REPLACE-WITH-YOUR-TEAM-SLUG>\"";
/** Named-source line in the TS template, replaced when values diverge. */
export declare const TS_SOURCE_ANCHOR = "  source: \"production\",";
/** Named-source line in the YAML template, replaced when values diverge. */
export declare const YAML_SOURCE_ANCHOR = "source: production";
/**
 * Validate an owner individual. Empty/undefined is allowed (means "omit").
 * Returns `true` when valid (matching @inquirer/prompts' validate contract),
 * or an error-message string otherwise.
 */
export declare function validateIndividual(value: string | undefined): true | string;
/** Prompts fire only when the session is interactive and --yes is unset. */
export declare function shouldPrompt(opts: {
    yes?: boolean;
}, isTty: boolean): boolean;
/**
 * Resolve supplied source values into the inline block to write, or
 * `undefined` to keep the template's named `production` reference.
 *
 * Returns `undefined` when no source value was supplied, or when every
 * supplied value equals the production defaults — spelling the production
 * source inline would record `source.name = "env-override"` in provenance
 * and classify the run `experimental` (D0059), so the named reference is
 * kept whenever it is value-equivalent. A diverging value produces the
 * full inline tuple, with production defaults filling unsupplied fields
 * (matching the prior template behavior of overriding scalars in place).
 */
export declare function resolveSourceInjection(v: ConfigInjectionValues): Required<Omit<RepoSourceConfig, "studioOrigin">> | undefined;
/** Inject values into the raw TypeScript config template. */
export declare function injectIntoTs(template: string, v: ConfigInjectionValues): string;
/** Inject values into the raw YAML config template. */
export declare function injectIntoYaml(template: string, v: ConfigInjectionValues): string;
/**
 * Inject the resolved owner team into the scaffolded GitHub Actions workflow,
 * replacing the placeholder slug. Only `team` is injected — the workflow's
 * `AILF_OWNER_INDIVIDUAL` stays `${{ github.actor }}` so CI attributes each run
 * to the user who triggered it. Without a resolved team the template is
 * returned unchanged (placeholder preserved for the user to edit by hand).
 *
 * This matters for correctness, not just convenience: the `AILF_OWNER_TEAM` env
 * var takes precedence over the config's `owner.team` (D0037), so an unedited
 * placeholder would otherwise override a team the user set in their config.
 */
export declare function injectIntoWorkflow(template: string, v: ConfigInjectionValues): string;
/** Merge values into a parsed config object (the JSON output path). */
export declare function injectIntoData(data: RepoConfig, v: ConfigInjectionValues): RepoConfig;
