/**
 * Branch annotation for
 */
export type BranchSegment = {
    groupId: number;
    branchIndex: number;
    start: number;
    end: number;
};
/**
 * Compute branch segments from a list of template token ranges.
 *
 * @param {TemplateSyntax[]} templateInfos The TemplateSyntax[] returned by
 * @param {string} source The source text that templateInfos was parsed from.
 *   Must be the same string (same character offsets) — i.e. the
 *   frontmatter-stripped `html` string from getOptions(), NOT the full `code`
 *   string. The caller is responsible for adding any frontmatter offset to the
 *   returned segments.
 * @param {{
 *   open: string;
 *   close: string;
 *   branch?: {
 *     start: RegExp;
 *     continue: RegExp;
 *     end: RegExp;
 *     blockOpen?: RegExp;
 *     blockClose?: RegExp;
 *   };
 * }[]} syntaxItems
 *   Normalized SyntaxConfigItem array. Only items that have a .branch property
 *   are consulted; the rest are ignored.
 * @returns {BranchSegment[]}
 * @html-eslint/template-syntax-parser. Each entry covers one complete
 *   template token: open is the [start,end] of the opening delimiter, close is
 *   the [start,end] of the closing delimiter. Content lives between open[1] and
 *   close[0].
 */
export function computeBranchSegments(templateInfos: TemplateSyntax[], source: string, syntaxItems: {
    open: string;
    close: string;
    branch?: {
        start: RegExp;
        continue: RegExp;
        end: RegExp;
        blockOpen?: RegExp;
        blockClose?: RegExp;
    };
}[]): BranchSegment[];
/**
 * Return the [start, end] ranges of every template token that was classified as
 * a branch-control token (START / CONTINUE / END / BLOCK_OPEN / BLOCK_CLOSE) —
 * i.e. an `{% if %}`, `{% else %}`, `{% endif %}`, or similar structural token,
 * as opposed to a plain value-interpolation token like `{{ name }}`.
 *
 * Rules use this to distinguish two situations where a template token ends up
 * glued onto the text of a following attribute key (because there is no
 * whitespace separating them, e.g. `{%if x%}data-id="1"`):
 *
 * 1. The glued token is a branch-control token — the attribute's real name
 *    ("data-id") is statically known and can be safely compared across branches
 *    once the glued prefix is stripped.
 * 2. The glued token is a plain interpolation — the attribute's name is genuinely
 *    dynamic (e.g. `data-{{name}}`) and can't be safely compared at all, so it
 *    must continue to be skipped.
 *
 * @param {TemplateSyntax[]} templateInfos
 * @param {string} source
 * @param {{
 *   open: string;
 *   close: string;
 *   branch?: {
 *     start: RegExp | string;
 *     continue: RegExp | string;
 *     end: RegExp | string;
 *     blockOpen?: RegExp | string;
 *     blockClose?: RegExp | string;
 *   };
 * }[]} syntaxItems
 * @returns {[number, number][]}
 */
export function getControlTokenRanges(templateInfos: TemplateSyntax[], source: string, syntaxItems: {
    open: string;
    close: string;
    branch?: {
        start: RegExp | string;
        continue: RegExp | string;
        end: RegExp | string;
        blockOpen?: RegExp | string;
        blockClose?: RegExp | string;
    };
}[]): [number, number][];
import type { TemplateSyntax } from "@html-eslint/template-syntax-parser";
//# sourceMappingURL=branch-annotation.d.ts.map