/**
 * Template-based formatting utilities for the libphonenumber polyfill.
 *
 * These helpers replicate the progressive formatting logic used by
 * libphonenumber-js to produce as-you-type output.
 */
import type { FormatRule } from './types';
/**
 * Check whether a format's replacement template only uses captured groups
 * (doesn't insert extra digits). This mirrors NON_ALTERING_FORMAT_REG_EXP
 * in the original library.
 *
 * @param {string} replacement - the replacement string to test
 * @returns {boolean} true if the format is non-altering
 */
export declare function isNonAlteringFormat(replacement: string): boolean;
/**
 * Check if a format is suitable given the current formatting context.
 * Mirrors formatSuits() from the original library's AsYouTypeFormatter.
 *
 * @param {FormatRule} formatRule - the format rule to check
 * @param {boolean} international - whether the number is international
 * @param {boolean} nationalPrefix - whether a national prefix is present
 * @returns {boolean} true if the format is suitable
 */
export declare function formatSuits(formatRule: FormatRule, international: boolean, nationalPrefix: boolean): boolean;
/**
 * Check whether a format's leading digits match the given national number.
 *
 * @param {FormatRule} formatRule - the format rule to check
 * @param {string} nationalNumber - the national number digits
 * @param {number} leadingDigitsPatternIndex - index into the leading digits patterns
 * @returns {boolean} true if the leading digits match
 */
export declare function formatMatchesLeadingDigits(formatRule: FormatRule, nationalNumber: string, leadingDigitsPatternIndex: number): boolean;
/**
 * Build a formatting template for a given format rule and national number.
 *
 * This replicates the template-generation logic from the original library:
 * 1. Generate a dummy number of 9s matching the format pattern.
 * 2. Format it with the replacement template.
 * 3. Replace each 9 with the DIGIT_PLACEHOLDER.
 *
 * @param {FormatRule} formatRule - the format rule to build a template from
 * @param {number} nationalSignificantNumberLength - length of the national significant number
 * @returns {string | undefined} the built template, or undefined if no match
 */
export declare function buildTemplate(formatRule: FormatRule, nationalSignificantNumberLength: number): string | undefined;
/**
 * Cut a template at a given position, handling closing parentheses.
 * Matches the cut-and-strip logic from the original library.
 *
 * @param {string} str - the template string to cut
 * @param {number} cutBefore - the position to cut before
 * @returns {string} the cut and stripped template
 */
export declare function cutAndStripNonPairedParens(str: string, cutBefore: number): string;
/**
 * Apply international separator style: replace parentheses and dashes with spaces.
 *
 * @param {string} template - the template string to transform
 * @returns {string} the template with international separator style applied
 */
export declare function applyInternationalSeparatorStyle(template: string): string;
