import type { Sheet } from '@fortune-sheet/core'; import { type SpreadsheetConditionalComparisonOperator } from '../work-spreadsheet-conditional-comparisons'; import { type SpreadsheetConditionalIconSetName, type SpreadsheetConditionalIconThreshold } from '../work-spreadsheet-conditional-icons'; import { type SpreadsheetConditionalThreshold } from '../work-spreadsheet-conditional-values'; import type { FortuneConditionalFormatRule } from '../work-xlsx-conditional-format'; import type { WorkSpreadsheetContent } from '../work-types'; export interface SpreadsheetConditionalThresholdDraft { type: SpreadsheetConditionalThreshold['type']; value: string; gte: boolean; } export declare const SPREADSHEET_CONDITIONAL_COMPARISONS: { name: "between" | "greaterThan" | "greaterThanOrEqual" | "lessThan" | "lessThanOrEqual" | "equal" | "notEqual" | "notBetween"; label: string; }[]; export interface ConditionalRuleDraft { sheetId: string; type: 'cellComparison' | 'colorGradation' | 'dataBar' | 'icons' | 'formula' | 'toolbarRule'; reference: string; stopIfTrue: boolean; preservedRule: FortuneConditionalFormatRule | null; comparisonOperator: SpreadsheetConditionalComparisonOperator; comparisonValue: string; comparisonUpperValue: string; comparisonTextColor: string; comparisonCellColor: string; comparisonUseTextColor: boolean; comparisonUseCellColor: boolean; formula: string; formulaTextColor: string; formulaCellColor: string; formulaUseTextColor: boolean; formulaUseCellColor: boolean; scaleSize: '2' | '3'; minimumColor: string; midpointColor: string; maximumColor: string; scaleThresholds: SpreadsheetConditionalThresholdDraft[]; barColor: string; barThresholds: SpreadsheetConditionalThresholdDraft[]; barShowValue: boolean; barMinLength: string; barMaxLength: string; iconSet: SpreadsheetConditionalIconSetName; iconShowValue: boolean; iconReverse: boolean; iconThresholds: SpreadsheetConditionalThresholdDraft[]; } export interface ConditionalRuleEntry { sheet: Sheet & { id: string; }; rule: FortuneConditionalFormatRule; index: number; } export declare function managedConditionalFormatCount(content: WorkSpreadsheetContent): number; export declare function managedConditionalRuleEntries(sheets: Array): ConditionalRuleEntry[]; export declare function sheetConditionalRules(sheet: Sheet): unknown[]; export declare function withConditionalRules(sheet: Sheet, rules: unknown[]): Sheet; export declare function isManagedConditionalRule(value: unknown): value is FortuneConditionalFormatRule; export declare function newConditionalRuleDraft(sheetId: string): ConditionalRuleDraft; export declare function conditionalRuleDraftForRule(sheetId: string, rule: FortuneConditionalFormatRule): ConditionalRuleDraft; export type ConditionalRuleBuildResult = { rule: FortuneConditionalFormatRule; } | { error: string; }; export declare function buildConditionalRule(draft: ConditionalRuleDraft): ConditionalRuleBuildResult; export declare function conditionalRuleLabel(rule: FortuneConditionalFormatRule): string; export declare function conditionalToolbarRuleSummary(rule: FortuneConditionalFormatRule | null): string; export declare function conditionalThresholdDrafts(thresholds: Array): SpreadsheetConditionalThresholdDraft[]; export declare function savedIconThresholds(thresholds: SpreadsheetConditionalThresholdDraft[]): SpreadsheetConditionalIconThreshold[] | null; export declare function savedVisualThresholds(thresholds: SpreadsheetConditionalThresholdDraft[]): SpreadsheetConditionalThreshold[] | null;