import { AnyConfig } from '../config.js';
import { GridChangeHandler } from '../events/onGridChange.js';
import { GridResizeHandler } from '../events/onGridResize.js';
import { SetGridHandler } from '../events/onSetGrid.js';
import GridData from '../grid.js';
import { RuleState } from '../primitives.js';
import { ControlLine } from './musicControlLine.js';
import Rule, { SearchVariant } from './rule.js';
export default class MusicGridRule extends Rule implements GridChangeHandler, SetGridHandler, GridResizeHandler {
    readonly controlLines: readonly ControlLine[];
    readonly track: GridData | null;
    private static readonly EXAMPLE_GRID;
    private static readonly CONFIGS;
    private static readonly SEARCH_VARIANTS;
    /**
     * **Music Grid: Listen to the solution**
     * @param controlLines Denote changes in the playback settings. At least one control line at column 0 should be present to enable playback.
     * @param track The grid to be played when "listen" is clicked. Set as null to play the solution.
     */
    constructor(controlLines: readonly ControlLine[], track: GridData | null);
    get id(): string;
    get explanation(): string;
    get configs(): readonly AnyConfig[] | null;
    createExampleGrid(): GridData;
    get searchVariants(): SearchVariant[];
    validateGrid(_grid: GridData): RuleState;
    onSetGrid(_oldGrid: GridData, newGrid: GridData): GridData;
    onGridChange(newGrid: GridData): this;
    onGridResize(_grid: GridData, mode: 'insert' | 'remove', direction: 'row' | 'column', index: number): this | null;
    /**
     * Add or replace a control line.
     * @param controlLine The control line to set.
     * @returns A new rule with the control line set.
     */
    setControlLine(controlLine: ControlLine): this;
    withTrack(track: GridData | null): this;
    copyWith({ controlLines, track, }: {
        controlLines?: readonly ControlLine[];
        track?: GridData | null;
    }): this;
    get validateWithSolution(): boolean;
    get isSingleton(): boolean;
    static mergeControlLines(...lines: ControlLine[]): ControlLine;
    static deduplicateControlLines(lines: readonly ControlLine[]): ControlLine[];
}
export declare const instance: MusicGridRule;
