import type { CellRangeRef } from '@bilig/protocol';
import type { EngineOp } from '@bilig/workbook';
interface RangeProtectedRecord {
    readonly range: CellRangeRef;
}
interface TableProtectedRecord {
    readonly sheetName: string;
    readonly startAddress: string;
    readonly endAddress: string;
}
interface SourceProtectedRecord {
    readonly sheetName: string;
    readonly address: string;
    readonly source: CellRangeRef;
}
interface PivotProtectedRecord {
    readonly sheetName: string;
    readonly address: string;
    readonly source?: CellRangeRef;
}
interface AnchorProtectedRecord {
    readonly sheetName: string;
    readonly address: string;
}
interface WorkbookProtectedRecord {
    readonly lockStructure?: boolean;
}
export interface OperationProtectionAccess {
    readonly getWorkbookProtection?: () => WorkbookProtectedRecord | undefined;
    readonly hasProtectionMetadataForSheet?: (sheetName: string) => boolean;
    readonly getCellStyleProtection?: (sheetName: string, row: number, col: number) => {
        readonly locked?: boolean;
        readonly hidden?: boolean;
    } | undefined;
    readonly getSheetProtection: (sheetName: string) => unknown;
    readonly listRangeProtections: (sheetName: string) => readonly RangeProtectedRecord[];
    readonly getConditionalFormat: (id: string) => RangeProtectedRecord | undefined;
    readonly getTable: (name: string) => TableProtectedRecord | undefined;
    readonly getPivot: (sheetName: string, address: string) => PivotProtectedRecord | undefined;
    readonly getChart: (id: string) => SourceProtectedRecord | undefined;
    readonly getImage: (id: string) => AnchorProtectedRecord | undefined;
    readonly getShape: (id: string) => AnchorProtectedRecord | undefined;
}
export declare function workbookStructureIsLocked(access: OperationProtectionAccess): boolean;
export declare function sheetHasProtection(access: OperationProtectionAccess, sheetName: string): boolean;
export declare function rangeIsProtected(access: OperationProtectionAccess, range: CellRangeRef): boolean;
export declare function assertProtectionAllowsOp(access: OperationProtectionAccess, op: EngineOp): void;
export {};
