import { DateTime } from 'luxon';
/** True for numeric invoice-month segment `01`–`12`. */
export declare function isNumericInvoiceMonthSegment(token: string): boolean;
/** `2026-27` → `26-27`; already-short labels pass through. */
export declare function toShortFinancialYear(yearLabel: string): string;
/** Full English month (e.g. JUNE) → `06`. */
export declare function toInvoiceMonthMmFromFull(monthFullUpper: string): string;
/** Replace `O&M` segments with `OM` for display Invoice No. strings. */
export declare function toOmDisplayPrefix(prefix: string): string;
export type InvoiceNumberPeriodParts = {
    /** Uppercase 3-letter-ish token (e.g. SEPT) — kept for callers that need a short month key */
    monthAbbr: string;
    /** Uppercase full English month name (e.g. APRIL) — used in {@link billingPeriod} and invoice numbers */
    monthFullUpper: string;
    yearLabel: string;
    /** e.g. APRIL/2026-27 */
    billingPeriod: string;
};
export type InvoiceNumberPeriodOptions = {
    /**
     * When true, Invoice No. month/FY use `targetDate`'s calendar month (no −1 month).
     * Used only by Scheme Import/Create catch-up Proforma Invoice No. generation.
     */
    useCalendarMonthOfTarget?: boolean;
};
/**
 * Month/FY segments from the given calendar month (no rollback).
 * Example: August 2026 → AUGUST / 2026-27 / billingPeriod AUGUST/2026-27.
 */
export declare function getCalendarMonthPeriodParts(billMonth: DateTime): InvoiceNumberPeriodParts;
export declare function getBillingPeriodParts(targetDate: DateTime): InvoiceNumberPeriodParts;
/** Collapse slashes/whitespace (`0194/O&M/ MAR` → `0194/O&M/MAR`), trim segments. Empty → ''. */
export declare function normalizeStoredInvoicePrefix(raw: string | null | undefined): string;
/**
 * Display: {prefix}/OM/{MM}/{YY-YY} (prefix may already include OM/O&M; do not insert another segment).
 * Example: `0001/OM` + June bill → `0001/OM/06/26-27`.
 * Pass `{ useCalendarMonthOfTarget: true }` to use `targetDate`'s month (catch-up Import/Create).
 */
export declare function buildInvoiceNumberDisplay(displayPrefix: string, targetDate: DateTime, options?: InvoiceNumberPeriodOptions): string;
/**
 * Technical unique key for DB (invoices.invoice_number): prefix/period/schemeCode
 * Keeps legacy `{FULL_MONTH}/{YYYY-YY}` period shape for uniqueness stability.
 */
export declare function buildTechnicalInvoiceNumber(displayPrefix: string, targetDate: DateTime, schemeCode: string): string;
/** @deprecated Use buildTechnicalInvoiceNumber + buildInvoiceNumberDisplay */
export declare function buildScheduledOmInvoiceNumber(params: {
    schemeInvoicePrefix?: string | null;
    agencyInvoicePrefix: string;
    schemeCode: string;
    targetDate: DateTime;
}): string;
export declare function resolveDisplayInvoicePrefix(params: {
    invoiceConfigurationPrefix?: string | null;
    invoiceConfigPrefix?: string | null;
    schemeInvoicePrefix?: string | null;
}): string;
/** Scheduled O&M job: invoice number prefix must come from schemes.invoice_number_prefix only. */
export declare function resolveScheduledOmPrefixFromScheme(scheme: {
    invoiceNumberPrefix?: string | null;
}): string;
/**
 * Strip trailing month/FY tokens from a stored prefix (e.g. import `O&M/APRIL/2026-27` → `O&M`,
 * `0194/O&M/MAR` → `0194/O&M`, `0001/OM/06/26-27` → `0001/OM`) so {@link buildInvoiceNumberDisplay}
 * does not duplicate billing period.
 */
export declare function stripTrailingMonthAndFyFromPrefix(prefix: string): string;
/** True when the scheme uses the default bare `O&M`/`OM` prefix (monthly serial applies). */
export declare function isBareOmInvoicePrefix(prefix: string): boolean;
/**
 * Monthly serial segment before `/OM`: `0001`–`9999` (4-digit pad), then `10000`, `10001`, … (no extra pad).
 */
export declare function formatOmMonthlySerial(serial: number): string;
/** e.g. serial 1 → `0001/OM`, serial 10000 → `10000/OM` */
export declare function buildOmDisplayPrefixWithMonthlySerial(serial: number): string;
/** True when display starts with a numeric monthly serial before `OM`/`O&M` (e.g. `0001/OM/06/26-27`). */
export declare function hasOmMonthlySerialPrefix(display: string): boolean;
/** True for legacy bare tax/proforma display `O&M/MONTH/FY` (or `OM/MM/YY-YY`) without a leading serial segment. */
export declare function isBareOmMonthlyInvoiceDisplay(display: string): boolean;
/** Full display for bare O&M tax invoice: `0001/OM/06/26-27`. */
export declare function buildBareOmTaxInvoiceNumberDisplay(serial: number, monthFullUpper: string, yearLabel: string): string;
/**
 * Resolves display prefix for scheduled O&M invoices. Bare `O&M` schemes get a global monthly serial
 * (`0001/OM`, `0002/OM`, …); scheme-specific prefixes (e.g. `015/O&M`) are unchanged at this stage
 * (`O&M` → `OM` happens in {@link buildInvoiceNumberDisplay}).
 */
export declare function resolveScheduledOmDisplayPrefix(params: {
    schemeInvoicePrefix?: string | null;
    targetDate: DateTime;
    countForPeriod: (monthFullUpper: string, yearLabel: string) => Promise<number>;
    useCalendarMonthOfTarget?: boolean;
}): Promise<string>;
/**
 * Billing month + Indian FY label from the **end** date of the O&M bill window (not the scheduler "anchor − 1 month" rule).
 * Example: 2026-04-09 → APRIL/2026-27
 */
export declare function buildBillingPeriodFromPeriodEndDate(endDate: DateTime): string;
/**
 * Tax invoice PDF: INVOICE No. month/FY come from `periodEndIso` (Submitted Date from Generate Tax Invoice).
 * Replaces any month segments immediately before the FY token with numeric `MM` + short FY (`26-27`).
 */
export declare function rebuildInvoiceNumberDisplayForTaxPdf(params: {
    storedDisplay: string;
    technicalFallback?: string;
    periodEndIso: string;
    zone: string;
}): string;
/**
 * Truncates a slash-separated invoice number after the financial year segment (e.g. 2026-27 or 26-27).
 * Example: `015/O&M/MAR/2026-27/SCH-1226` → `015/O&M/MAR/2026-27`
 * If no such segment exists, returns the trimmed input unchanged.
 */
export declare function truncateInvoiceNumberAfterFinancialYear(raw: string): string;
/** Collapse duplicate "O&M"/"OM" segments and normalize slashes. */
export declare function normalizeInvoiceNumberDisplay(raw: string): string;
//# sourceMappingURL=scheduledInvoiceNumber.d.ts.map