import { FC } from 'react';
import { ForwardRefExoticComponent } from 'react';
import { LazyExoticComponent } from 'react';
import { NiceBaseProps } from '@nice2dev/ui-core';
import { RefAttributes } from 'react';

declare interface ActionParam {
    id: string;
    name: string;
    type: FieldType;
    required?: boolean;
}

declare interface APIEndpoint {
    id: string;
    name: string;
    description?: string;
    method: HTTPMethod;
    path: string;
    tags?: string[];
    pathParams?: ParamDefinition[];
    queryParams?: ParamDefinition[];
    headers?: ParamDefinition[];
    body?: BodyDefinition;
    responses: ResponseDefinition[];
    retry?: RetryConfig;
    cache?: EndpointCacheConfig;
    timeout?: number;
    mock?: MockResponse;
}

declare interface APIFlowDefinition {
    id: string;
    name: string;
    description?: string;
    baseUrl: string;
    version?: string;
    endpoints: APIEndpoint[];
    auth?: AuthConfig;
    globalHeaders?: Record<string, string>;
    errorHandling?: ErrorHandlingConfig;
    cacheConfig?: CacheConfig;
}

declare interface Assertion {
    matcher: AssertionMatcher;
    expected?: unknown;
    not?: boolean;
}

declare type AssertionMatcher = 'toEqual' | 'toBe' | 'toBeTruthy' | 'toBeFalsy' | 'toBeNull' | 'toBeUndefined' | 'toContain' | 'toHaveLength' | 'toBeInTheDocument' | 'toHaveTextContent' | 'toHaveAttribute' | 'toHaveClass' | 'toHaveStyle' | 'toHaveBeenCalled' | 'toHaveBeenCalledWith' | 'toHaveBeenCalledTimes' | 'toThrow' | 'toMatchSnapshot';

declare interface AuthConfig {
    type: 'none' | 'bearer' | 'basic' | 'api-key' | 'oauth2';
    tokenSource?: string;
    headerName?: string;
    prefix?: string;
}

declare interface BlameAuthor {
    id: string;
    name: string;
    email: string;
    avatar?: string;
}

declare interface BlameCommit {
    id: string;
    shortId: string;
    message: string;
    author: BlameAuthor;
    timestamp: Date;
    parents?: string[];
}

declare interface BlameFile {
    path: string;
    revision: string;
    hunks: BlameHunk[];
    language?: string;
    totalLines: number;
}

declare interface BlameHunk {
    startLine: number;
    endLine: number;
    commit: BlameCommit;
    lines: BlameLine[];
}

declare interface BlameLine {
    lineNumber: number;
    content: string;
    commit: BlameCommit;
    originalLineNumber?: number;
    originalFilename?: string;
}

declare type BlameViewMode = 'inline' | 'gutter' | 'tooltip';

declare interface BodyDefinition {
    contentType: 'application/json' | 'multipart/form-data' | 'application/x-www-form-urlencoded' | 'text/plain';
    schema?: SchemaDefinition;
}

declare interface BranchProtectionRule {
    pattern: string;
    requirePullRequest?: boolean;
    requiredReviewers?: number;
    requireStatusChecks?: string[];
    requireSignedCommits?: boolean;
    allowForcePush?: boolean;
    allowDeletion?: boolean;
}

declare type BranchStatus = 'active' | 'stale' | 'merged' | 'deleted' | 'syncing' | 'conflict';

declare interface CacheConfig {
    enabled: boolean;
    storage: 'memory' | 'localStorage' | 'sessionStorage';
    defaultTTL: number;
}

/** Diff change types */
declare type ChangeType = 'added' | 'modified' | 'deleted' | 'renamed' | 'unchanged';

declare interface CodeTemplate {
    id: string;
    name: string;
    description: string;
    category: string;
    icon?: string;
    engine: TemplateEngine;
    variables: TemplateVariable[];
    files: TemplateFile[];
    hooks?: {
        beforeGenerate?: string;
        afterGenerate?: string;
    };
    metadata?: {
        author?: string;
        version?: string;
        tags?: string[];
        framework?: string;
    };
}

declare interface ComputedField {
    id: string;
    name: string;
    expression: string;
    dependencies: string[];
}

declare interface ConfigField {
    name: string;
    label: string;
    type: 'string' | 'number' | 'boolean' | 'select' | 'code' | 'json';
    options?: {
        value: string;
        label: string;
    }[];
    required?: boolean;
    default?: unknown;
}

declare interface ConfigField_2 {
    name: string;
    label: string;
    type: 'string' | 'number' | 'boolean' | 'select' | 'code' | 'json';
    options?: {
        value: string;
        label: string;
    }[];
    required?: boolean;
    default?: unknown;
}

declare interface ConflictFile {
    path: string;
    language?: string;
    baseRef: string;
    oursRef: string;
    theirsRef: string;
    content: string;
    conflicts: ConflictRegion[];
}

declare interface ConflictRegion {
    id: string;
    startLine: number;
    endLine: number;
    baseContent: string[];
    oursContent: string[];
    theirsContent: string[];
    resolved: boolean;
    resolution?: 'ours' | 'theirs' | 'both' | 'custom';
    customContent?: string[];
}

declare interface ConflictResolution {
    conflictId: string;
    strategy: MergeStrategy;
    fieldResolutions: FieldResolutionMap;
}

declare interface ConflictResolutionChoice {
    conflictId: string;
    strategy: MergeStrategy;
    customValue?: unknown;
}

declare type ConflictType = 'concurrent-update' | 'delete-update' | 'update-delete' | 'constraint-violation' | 'unique-key-conflict' | 'foreign-key-missing' | 'type-mismatch' | 'schema-change';

declare type ConflictViewMode = 'inline' | 'split' | 'three-way';

declare interface CreateSnapshotConfig {
    name: string;
    description?: string;
    tables?: string[];
    tags?: string[];
}

declare interface DataBranch extends VersioningBranch {
    type: 'data';
    environment: DataEnvironment;
    tenant: string;
    sourceSnapshot?: string;
    syncSchedule?: SyncSchedule;
    tables?: string[];
    size?: {
        records: number;
        bytes: number;
    };
}

declare interface DataBranchCommit {
    id: string;
    shortId: string;
    message: string;
    description?: string;
    branch: string;
    environment: DataEnvironment;
    author: {
        id: string;
        name: string;
    };
    timestamp: Date;
    parents: string[];
    isMerge: boolean;
    isSnapshot: boolean;
    stats: {
        tables: number;
        recordsAdded: number;
        recordsModified: number;
        recordsDeleted: number;
    };
    tags?: string[];
}

declare interface DataConflict {
    id: string;
    table: string;
    tableName: string;
    recordId: string;
    recordLabel?: string;
    type: ConflictType;
    severity: 'low' | 'medium' | 'high' | 'critical';
    fields: FieldConflict[];
    metadata?: {
        sourceModifiedAt?: Date;
        sourceModifiedBy?: string;
        targetModifiedAt?: Date;
        targetModifiedBy?: string;
    };
    suggestion?: MergeStrategy;
    suggestionReason?: string;
}

declare type DataEnvironment = 'development' | 'testing' | 'uat' | 'staging' | 'production';

declare interface DataFieldDiff {
    field: string;
    fieldType: string;
    oldValue: unknown;
    newValue: unknown;
    changeType: ChangeType;
}

declare interface DataSource {
    id: string;
    name: string;
    type: 'state' | 'prop' | 'context' | 'constant';
    path: string;
}

declare type DataType = 'string' | 'number' | 'boolean' | 'date' | 'array' | 'object' | 'any';

declare interface DevToolsConfig {
    enabled: boolean;
    name?: string;
    anonymousActionType?: string;
    trace?: boolean;
}

declare interface DiffChunk {
    oldStart: number;
    oldLines: number;
    newStart: number;
    newLines: number;
    lines: DiffLine[];
    header?: string;
}

declare interface DiffComment {
    id: string;
    filePath: string;
    line: number;
    side: 'old' | 'new';
    author: {
        name: string;
        avatar?: string;
    };
    body: string;
    createdAt: Date;
    resolved?: boolean;
}

declare interface DiffFile {
    path: string;
    oldPath?: string;
    status: 'added' | 'modified' | 'deleted' | 'renamed' | 'copied';
    binary?: boolean;
    additions: number;
    deletions: number;
    chunks: DiffChunk[];
    language?: string;
}

declare interface DiffLine {
    lineNumberOld?: number;
    lineNumberNew?: number;
    content: string;
    type: 'context' | 'addition' | 'deletion' | 'header';
}

declare type DiffViewMode = 'split' | 'unified';

declare interface EndpointCacheConfig {
    enabled: boolean;
    ttl: number;
    strategy: 'cache-first' | 'network-first' | 'stale-while-revalidate';
}

declare interface ErrorHandlingConfig {
    globalErrorHandler?: boolean;
    retryOnNetworkError?: boolean;
    transformError?: boolean;
}

declare interface EventCondition {
    field: string;
    operator: 'eq' | 'neq' | 'gt' | 'lt' | 'gte' | 'lte' | 'contains' | 'exists';
    value: unknown;
}

declare interface EventFilter {
    field?: string;
    value?: unknown;
    expression?: string;
}

declare interface EventFlow {
    id: string;
    name: string;
    description?: string;
    enabled: boolean;
    source: EventSource_2;
    handlers: EventHandler[];
    errorHandler?: EventHandler;
}

declare interface EventHandler {
    id: string;
    type: EventHandlerType;
    config: Record<string, unknown>;
    modifiers?: EventModifier[];
    condition?: EventCondition;
    next?: string;
}

declare interface EventHandlerDefinition {
    type: EventHandlerType;
    label: string;
    icon: string;
    color: string;
    configSchema: ConfigField[];
}

declare type EventHandlerType = 'action' | 'transform' | 'dispatch' | 'api-call' | 'state-update' | 'notification' | 'log' | 'delay' | 'branch';

declare interface EventModifier {
    type: 'debounce' | 'throttle' | 'delay' | 'retry' | 'once';
    value: number;
    unit?: 'ms' | 's';
}

declare interface EventSource_2 {
    id: string;
    type: EventSourceType;
    config: Record<string, unknown>;
    filter?: EventFilter;
}

declare interface EventSourceDefinition {
    type: EventSourceType;
    label: string;
    icon: string;
    color: string;
    configSchema: ConfigField[];
}

declare type EventSourceType = 'ui-event' | 'api-response' | 'websocket' | 'timer' | 'custom' | 'state-change' | 'broadcast';

declare interface ExpectedResult {
    type: 'value' | 'element' | 'state' | 'call' | 'error' | 'snapshot';
    assertion: Assertion;
}

declare type ExportFormat = 'zustand' | 'redux-toolkit' | 'jotai' | 'recoil' | 'mobx';

declare type ExportFormat_2 = 'sql' | 'json' | 'csv' | 'parquet';

declare interface FieldConflict {
    field: string;
    fieldLabel: string;
    dataType: string;
    sourceValue: unknown;
    targetValue: unknown;
    baseValue?: unknown;
    resolution?: 'source' | 'target' | 'custom' | 'skip';
    customValue?: unknown;
}

declare interface FieldDefinition {
    id: string;
    name: string;
    path: string;
    type: DataType;
    nullable?: boolean;
    children?: FieldDefinition[];
    description?: string;
}

declare interface FieldMapping {
    id: string;
    sourceField: string;
    targetField: string;
    transform?: string;
    condition?: string;
    defaultValue?: unknown;
}

declare type FieldResolutionMap = Record<string, {
    resolution: 'source' | 'target' | 'custom';
    value: unknown;
}>;

declare type FieldType = 'string' | 'number' | 'boolean' | 'array' | 'object' | 'date' | 'enum' | 'custom';

declare interface FrameworkPreset {
    id: string;
    name: string;
    icon: string;
    description: string;
    templates: CodeTemplate[];
}

declare interface GeneratedFile {
    path: string;
    content: string;
    language?: string;
}

declare interface GitBranch {
    name: string;
    isRemote: boolean;
    isHead: boolean;
    upstream?: string;
    ahead?: number;
    behind?: number;
    lastCommit?: string;
    protected?: boolean;
}

declare interface GitBranch_2 {
    name: string;
    isRemote: boolean;
    isHead: boolean;
    upstream?: string;
    ahead?: number;
    behind?: number;
    lastCommit?: {
        hash: string;
        message: string;
        author: string;
        date: Date;
    };
    protected?: boolean;
    description?: string;
}

declare interface GitCommit {
    hash: string;
    shortHash: string;
    message: string;
    body?: string;
    author: {
        name: string;
        email: string;
        avatar?: string;
    };
    date: Date;
    parents: string[];
    /** Branch heads pointing at this commit */
    branches?: string[];
    /** Tags pointing at this commit */
    tags?: string[];
    /** Is this a merge commit */
    isMerge?: boolean;
    /** Files changed (summary) */
    stats?: {
        additions: number;
        deletions: number;
        filesChanged: number;
    };
}

declare interface GitHook {
    type: GitHookType;
    enabled: boolean;
    actions: HookAction[];
    parallel?: boolean;
    timeout?: number;
    verbose?: boolean;
}

declare type GitHookType = 'pre-commit' | 'prepare-commit-msg' | 'commit-msg' | 'post-commit' | 'pre-push' | 'pre-rebase' | 'post-merge' | 'post-checkout' | 'pre-auto-gc';

declare interface GitTag {
    name: string;
    commit: string;
    message?: string;
    tagger?: string;
    date?: Date;
    isAnnotated?: boolean;
}

declare interface HookAction {
    id: string;
    type: 'lint' | 'test' | 'format' | 'typecheck' | 'build' | 'custom';
    name: string;
    command: string;
    description?: string;
    icon?: string;
    runOn?: 'staged' | 'all' | 'changed';
    filePatterns?: string[];
    condition?: HookCondition;
    order: number;
    enabled: boolean;
    failOnError: boolean;
}

declare interface HookCondition {
    type: 'branch' | 'files' | 'env' | 'custom';
    operator: 'equals' | 'contains' | 'matches' | 'exists' | 'not';
    value: string;
}

declare interface HookTemplate {
    id: string;
    name: string;
    description: string;
    icon: string;
    category: 'lint' | 'test' | 'security' | 'quality' | 'ci';
    hook: GitHookType;
    actions: Omit<HookAction, 'id' | 'order'>[];
}

declare type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';

declare type JobStatus = 'pending' | 'running' | 'success' | 'failure' | 'cancelled' | 'skipped' | 'waiting';

export declare const LazyAPIFlow: LazyExoticComponent<FC<NiceAPIFlowProps>>;

export declare const LazyBranchManager: LazyExoticComponent<FC<NiceBranchManagerProps>>;

export declare const LazyChart: LazyExoticComponent<FC<NiceChartProps>>;

export declare const LazyCodeTemplate: LazyExoticComponent<FC<NiceCodeTemplateProps>>;

export declare const LazyDataBranchGraph: LazyExoticComponent<FC<NiceDataBranchGraphProps>>;

export declare const LazyDataBranchManager: LazyExoticComponent<FC<NiceDataBranchManagerProps>>;

export declare const LazyDataConflictResolver: LazyExoticComponent<FC<NiceDataConflictResolverProps>>;

export declare const LazyDataDiffViewer: LazyExoticComponent<FC<NiceDataDiffViewerProps>>;

export declare const LazyDataMapper: LazyExoticComponent<FC<NiceDataMapperProps>>;

export declare const LazyDataMergeBuilder: LazyExoticComponent<FC<NiceDataMergeBuilderProps>>;

export declare const LazyDataSnapshot: LazyExoticComponent<FC<NiceDataSnapshotProps>>;

export declare const LazyEventOrchestrator: LazyExoticComponent<FC<NiceEventOrchestratorProps>>;

export declare const LazyGitBlame: LazyExoticComponent<FC<NiceGitBlameProps>>;

export declare const LazyGitConflictResolver: LazyExoticComponent<FC<NiceGitConflictResolverProps>>;

export declare const LazyGitDiffViewer: LazyExoticComponent<FC<NiceGitDiffViewerProps>>;

export declare const LazyGitGraph: LazyExoticComponent<FC<NiceGitGraphProps>>;

export declare const LazyGitHooks: LazyExoticComponent<FC<NiceGitHooksProps>>;

export declare const LazyMergeRequestBuilder: LazyExoticComponent<FC<NiceMergeRequestBuilderProps>>;

export declare const LazyPipelineEditor: LazyExoticComponent<FC<NicePipelineEditorProps>>;

export declare const LazyPipelineMonitor: LazyExoticComponent<FC<NicePipelineMonitorProps>>;

export declare const LazySankey: LazyExoticComponent<FC<NiceSankeyProps>>;

export declare const LazyStateDesigner: LazyExoticComponent<FC<NiceStateDesignerProps>>;

export declare const LazyTestBuilder: LazyExoticComponent<FC<NiceTestBuilderProps>>;

export declare const LazyTreemap: LazyExoticComponent<ForwardRefExoticComponent<NiceTreeMapProps & RefAttributes<HTMLDivElement>>>;

declare interface MappingDefinition {
    id: string;
    name: string;
    description?: string;
    sourceSchema: SchemaDefinition_2;
    targetSchema: SchemaDefinition_2;
    fieldMappings: FieldMapping[];
    transformations: Transformation[];
    validationRules: ValidationRule_2[];
}

declare interface MergeConfig {
    sourceId: string;
    targetId: string;
    strategy: MergeStrategy;
    tables?: string[];
    createBackup: boolean;
    dryRun: boolean;
    scheduledAt?: Date;
    conflictResolutions?: Record<string, ConflictResolutionChoice>;
}

declare interface MergeContext {
    baseCommit: {
        id: string;
        shortId: string;
        message: string;
        author: string;
    };
    oursCommit: {
        id: string;
        shortId: string;
        message: string;
        author: string;
        branch: string;
    };
    theirsCommit: {
        id: string;
        shortId: string;
        message: string;
        author: string;
        branch: string;
    };
}

declare interface MergeRequestData {
    title: string;
    description: string;
    sourceBranch: string;
    targetBranch: string;
    isDraft: boolean;
    labels: string[];
    reviewers: string[];
    assignees: string[];
    linkedIssues: string[];
    squashCommits: boolean;
    deleteSourceBranch: boolean;
}

declare interface MergeRequestDiff {
    additions: number;
    deletions: number;
    changedFiles: number;
    files: Array<{
        path: string;
        status: 'added' | 'modified' | 'deleted' | 'renamed';
        additions: number;
        deletions: number;
    }>;
}

declare interface MergeRequestIssue {
    id: string;
    number: number;
    title: string;
    state: 'open' | 'closed';
    labels?: MergeRequestLabel[];
}

declare interface MergeRequestLabel {
    id: string;
    name: string;
    color: string;
    description?: string;
}

declare interface MergeRequestTemplate {
    id: string;
    name: string;
    description: string;
    content: string;
}

declare interface MergeRequestUser {
    id: string;
    name: string;
    email: string;
    avatar?: string;
}

/** Merge strategies */
declare type MergeStrategy = 'keep-source' | 'keep-target' | 'keep-both' | 'keep-base' | 'manual' | 'auto';

declare interface MiddlewareConfig {
    type: 'logger' | 'persist' | 'devtools' | 'immer' | 'custom';
    enabled: boolean;
    options?: Record<string, unknown>;
}

declare interface MockConfig {
    name: string;
    type: MockType;
    implementation?: string;
    returnValue?: unknown;
}

declare interface MockDefinition {
    name: string;
    type: MockType;
    description?: string;
    configSchema?: ConfigField_2[];
}

declare interface MockResponse {
    enabled: boolean;
    delay?: number;
    status?: number;
    body?: unknown;
}

declare type MockType = 'function' | 'module' | 'api' | 'timer' | 'storage';

declare interface NiceAPIFlowProps extends NiceBaseProps {
    /** API flow definition */
    flow?: APIFlowDefinition;
    /** Available data sources */
    dataSources?: DataSource[];
    onFlowChange?: (flow: APIFlowDefinition) => void;
    onExport?: (code: string) => void;
    onTest?: (endpointId: string) => void;
    onSave?: (flow: APIFlowDefinition) => void;
}

declare interface NiceBranchManagerProps extends NiceBaseProps {
    /** All branches */
    branches: GitBranch_2[];
    /** Current HEAD branch */
    currentBranch?: string;
    /** Default branch */
    defaultBranch?: string;
    /** Protection rules */
    protectionRules?: BranchProtectionRule[];
    /** Show remote branches */
    showRemotes?: boolean;
    /** Selected branch */
    selectedBranch?: string;
    onBranchSelect?: (branch: string) => void;
    onCheckout?: (branch: string) => void;
    onCreateBranch?: (name: string, fromBranch?: string) => void;
    onDeleteBranch?: (branch: string, force?: boolean) => void;
    onRenameBranch?: (oldName: string, newName: string) => void;
    onMerge?: (source: string, target: string) => void;
    onRebase?: (branch: string, onto: string) => void;
    onSetUpstream?: (branch: string, upstream: string) => void;
    onPush?: (branch: string, force?: boolean) => void;
    onPull?: (branch: string) => void;
    onCompare?: (branch1: string, branch2: string) => void;
    onProtectionChange?: (branch: string, rule: BranchProtectionRule | null) => void;
}

/** An annotation (reference line or label) overlaid on a {@link NiceChart}. */
declare interface NiceChartAnnotation {
    type: 'line' | 'label';
    /** For 'line': y-value to draw horizontal line at. For 'label': x-index. */
    value: number;
    label?: string;
    color?: string;
    dash?: string;
}

/**
 * Props for the NiceChart component — an SVG-based bar, line, and area chart
 * with stacking, zoom, crosshair, annotations, legend interaction and PNG export.
 */
declare interface NiceChartProps extends NiceBaseProps {
    series: NiceChartSeries[];
    categories?: string[];
    width?: number;
    height?: number;
    title?: string;
    showLegend?: boolean;
    /** Show gridlines (horizontal lines at Y ticks). Defaults to true. */
    showGrid?: boolean;
    /** Show axis tick labels (Y values, X categories). Defaults to true. */
    axisLabels?: boolean;
    showTooltip?: boolean;
    yAxisLabel?: string;
    xAxisLabel?: string;
    stacked?: boolean;
    /** Animate series on initial render. */
    animated?: boolean;
    /** Enable zoom/pan via mouse wheel and drag. */
    zoomable?: boolean;
    /** Show crosshair line at mouse position. */
    crosshair?: boolean;
    /** Annotations: horizontal lines, labels on chart. */
    annotations?: NiceChartAnnotation[];
    /** Click legend items to toggle series visibility. */
    legendInteractive?: boolean;
    /** Called when a data point is clicked for drill-down. */
    onDataPointClick?: (seriesName: string, dataIndex: number, value: number) => void;
    /** Show export button to download chart as PNG. */
    exportable?: boolean;
}

/** A single data series in a {@link NiceChart}. */
declare interface NiceChartSeries {
    name: string;
    data: number[];
    color?: string;
    type?: 'bar' | 'line' | 'area' | 'scatter' | 'radar';
}

declare interface NiceCodeTemplateProps extends NiceBaseProps {
    /** Available templates */
    templates: CodeTemplate[];
    /** Framework presets */
    presets?: FrameworkPreset[];
    /** Currently selected template */
    selectedTemplate?: string;
    /** Template engine */
    defaultEngine?: TemplateEngine;
    /** Show template library */
    showLibrary?: boolean;
    onTemplateSelect?: (template: CodeTemplate) => void;
    onTemplateCreate?: (template: CodeTemplate) => void;
    onTemplateUpdate?: (template: CodeTemplate) => void;
    onTemplateDelete?: (templateId: string) => void;
    onGenerate?: (files: GeneratedFile[], variables: Record<string, unknown>) => void;
    onExport?: (template: CodeTemplate, format: 'json' | 'zip') => void;
    onImport?: (template: CodeTemplate) => void;
}

declare interface NiceDataBranchGraphProps extends NiceBaseProps {
    /** Branches to display */
    branches?: DataBranch[];
    /** Commits/snapshots */
    commits?: DataBranchCommit[];
    /** Selected commit ID */
    selectedCommitId?: string;
    /** View mode */
    viewMode?: 'timeline' | 'graph' | 'list';
    /** Show environment lanes */
    showLanes?: boolean;
    onSelectCommit?: (commitId: string) => void;
    onSelectBranch?: (branchId: string) => void;
    onCompare?: (sourceId: string, targetId: string) => void;
    onRestore?: (commitId: string) => void;
}

declare interface NiceDataBranchManagerProps extends NiceBaseProps {
    /** Current tenant ID */
    tenant: string;
    /** Available environments/branches */
    branches?: DataBranch[];
    /** Current user */
    currentUser?: VersioningAuthor;
    /** Available tables for partial clone */
    availableTables?: TableInfo[];
    /** Read-only mode */
    readOnly?: boolean;
    onCreateBranch?: (branch: DataBranch) => void;
    onDeleteBranch?: (branchId: string) => void;
    onSwitchBranch?: (branchId: string) => void;
    onCloneBranch?: (sourceId: string, targetEnv: DataEnvironment, tables?: string[]) => void;
    onSyncBranch?: (branchId: string, direction: 'push' | 'pull') => void;
    onProtectBranch?: (branchId: string, rules: ProtectionConfig) => void;
    onScheduleSync?: (branchId: string, schedule: SyncSchedule) => void;
}

declare interface NiceDataConflictResolverProps extends NiceBaseProps {
    /** Conflicts to resolve */
    conflicts?: DataConflict[];
    /** Source environment */
    sourceEnvironment?: DataEnvironment;
    /** Target environment */
    targetEnvironment?: DataEnvironment;
    /** Show auto-resolution suggestions */
    showSuggestions?: boolean;
    /** Allow custom value editing */
    allowCustomValues?: boolean;
    onResolve?: (resolutions: ConflictResolution[]) => void;
    onSkip?: (conflictId: string) => void;
    onCancel?: () => void;
}

declare interface NiceDataDiffViewerProps extends NiceBaseProps {
    /** Source environment */
    sourceBranch?: DataBranch;
    /** Target environment */
    targetBranch?: DataBranch;
    /** Available branches for selection */
    branches?: DataBranch[];
    /** Diff data */
    diffItems?: TableDiffSummary[];
    onCompare?: (sourceId: string, targetId: string) => void;
    onExport?: (format: 'json' | 'csv' | 'sql') => void;
    onSelectRecord?: (table: string, recordId: string) => void;
}

declare interface NiceDataMapperProps extends NiceBaseProps {
    /** Mapping definition */
    mapping?: MappingDefinition;
    /** Available source schemas */
    sourceSchemas?: SchemaInfo[];
    /** Available target schemas */
    targetSchemas?: SchemaInfo[];
    onMappingChange?: (mapping: MappingDefinition) => void;
    onExport?: (code: string) => void;
    onTest?: (input: unknown) => void;
    onSave?: (mapping: MappingDefinition) => void;
}

declare interface NiceDataMergeBuilderProps extends NiceBaseProps {
    /** Available branches */
    branches?: DataBranch[];
    /** Pre-selected source branch */
    sourceBranchId?: string;
    /** Pre-selected target branch */
    targetBranchId?: string;
    onPreview?: (sourceId: string, targetId: string) => void;
    onMerge?: (config: MergeConfig) => void;
    onCancel?: () => void;
}

declare interface NiceDataSnapshotProps extends NiceBaseProps {
    /** Current environment */
    environment?: DataEnvironment;
    /** Available snapshots */
    snapshots?: Snapshot[];
    /** Retention policy */
    retentionPolicy?: RetentionPolicy;
    /** Scheduled snapshots */
    schedules?: SnapshotSchedule[];
    onCreateSnapshot?: (config: CreateSnapshotConfig) => void;
    onRestoreSnapshot?: (snapshotId: string) => void;
    onDeleteSnapshot?: (snapshotId: string) => void;
    onCompareSnapshots?: (sourceId: string, targetId: string) => void;
    onExportSnapshot?: (snapshotId: string, format: ExportFormat_2) => void;
    onUpdateRetentionPolicy?: (policy: RetentionPolicy) => void;
    onUpdateSchedules?: (schedules: SnapshotSchedule[]) => void;
}

declare interface NiceEventOrchestratorProps extends NiceBaseProps {
    /** Initial event flows */
    flows?: EventFlow[];
    /** Available event sources */
    eventSources?: EventSourceDefinition[];
    /** Available event handlers */
    eventHandlers?: EventHandlerDefinition[];
    onFlowsChange?: (flows: EventFlow[]) => void;
    onExport?: (code: string) => void;
    onTest?: (flowId: string) => void;
}

declare interface NiceGitBlameProps extends NiceBaseProps {
    /** Blame data for the file */
    file: BlameFile;
    /** How to display blame info */
    viewMode?: BlameViewMode;
    /** Show commit ages as colors */
    showAgeHeatmap?: boolean;
    /** Show author avatars */
    showAvatars?: boolean;
    /** Group consecutive lines from same commit */
    groupHunks?: boolean;
    /** Highlight commit on hover */
    highlightOnHover?: boolean;
    /** Time zone for date formatting */
    timeZone?: string;
    /** Filter by date range */
    dateRange?: {
        from?: Date;
        to?: Date;
    };
    /** Filter by authors */
    authorFilter?: string[];
    /** Selected line */
    selectedLine?: number;
    /** Syntax highlighting theme */
    syntaxTheme?: 'dark' | 'light';
    onLineClick?: (line: BlameLine) => void;
    onCommitClick?: (commit: BlameCommit) => void;
    onAuthorClick?: (author: BlameAuthor) => void;
    onBlameParent?: (commit: BlameCommit) => void;
}

declare interface NiceGitConflictResolverProps extends NiceBaseProps {
    /** File with conflicts */
    file: ConflictFile;
    /** Merge context information */
    context?: MergeContext;
    /** View mode */
    viewMode?: ConflictViewMode;
    /** Show line numbers */
    showLineNumbers?: boolean;
    /** Show base (ancestor) version */
    showBase?: boolean;
    /** Current focused conflict index */
    currentConflictIndex?: number;
    /** Syntax highlighting theme */
    syntaxTheme?: 'dark' | 'light';
    onResolve?: (conflictId: string, resolution: ConflictRegion['resolution'], content?: string[]) => void;
    onResolveAll?: (resolution: 'ours' | 'theirs') => void;
    onNavigateConflict?: (index: number) => void;
    onSave?: (content: string) => void;
    onCancel?: () => void;
}

declare interface NiceGitDiffViewerProps extends NiceBaseProps {
    /** Diff files */
    files: DiffFile[];
    /** View mode */
    viewMode?: DiffViewMode;
    /** Show whitespace changes */
    showWhitespace?: boolean;
    /** Comments on the diff */
    comments?: DiffComment[];
    /** Selected file */
    selectedFile?: string;
    /** Show file tree */
    showFileTree?: boolean;
    /** Context lines around changes */
    contextLines?: number;
    /** Base commit/branch for comparison */
    baseRef?: string;
    /** Head commit/branch for comparison */
    headRef?: string;
    onFileSelect?: (path: string) => void;
    onViewModeChange?: (mode: DiffViewMode) => void;
    onAddComment?: (filePath: string, line: number, side: 'old' | 'new', body: string) => void;
    onResolveComment?: (commentId: string) => void;
    onExpandChunk?: (filePath: string, chunkIndex: number) => void;
}

declare interface NiceGitGraphProps extends NiceBaseProps {
    /** Commits to display (newest first) */
    commits: GitCommit[];
    /** All branches */
    branches: GitBranch[];
    /** All tags */
    tags: GitTag[];
    /** Currently checked out branch/commit */
    head?: string;
    /** Selected commit hash */
    selectedCommit?: string;
    /** Branch filter */
    branchFilter?: string[];
    /** Author filter */
    authorFilter?: string[];
    /** Date range filter */
    dateRange?: {
        from?: Date;
        to?: Date;
    };
    /** Search query */
    searchQuery?: string;
    /** Max commits to show */
    maxCommits?: number;
    /** Show remote branches */
    showRemotes?: boolean;
    /** Show tags */
    showTags?: boolean;
    /** Compact mode */
    compact?: boolean;
    onCommitSelect?: (commit: GitCommit) => void;
    onCommitDoubleClick?: (commit: GitCommit) => void;
    onBranchCheckout?: (branch: string) => void;
    onBranchCreate?: (fromCommit: string) => void;
    onTagCreate?: (commit: string) => void;
    onCherryPick?: (commit: string) => void;
    onRevert?: (commit: string) => void;
    onReset?: (commit: string, mode: 'soft' | 'mixed' | 'hard') => void;
    onCompare?: (commit1: string, commit2: string) => void;
    onViewDiff?: (commit: string) => void;
}

declare interface NiceGitHooksProps extends NiceBaseProps {
    /** Current hooks configuration */
    hooks: GitHook[];
    /** Available templates */
    templates?: HookTemplate[];
    /** Hook manager type */
    manager?: 'native' | 'husky' | 'lefthook' | 'simple-git-hooks';
    /** Repository path */
    repoPath?: string;
    /** Currently editing hook */
    selectedHook?: GitHookType;
    onHookChange?: (hook: GitHook) => void;
    onHookToggle?: (hookType: GitHookType, enabled: boolean) => void;
    onActionAdd?: (hookType: GitHookType, action: HookAction) => void;
    onActionRemove?: (hookType: GitHookType, actionId: string) => void;
    onActionUpdate?: (hookType: GitHookType, action: HookAction) => void;
    onInstall?: (hookType: GitHookType) => void;
    onUninstall?: (hookType: GitHookType) => void;
    onExport?: (hooks: GitHook[], format: 'shell' | 'husky' | 'lefthook') => void;
}

declare interface NiceMergeRequestBuilderProps extends NiceBaseProps {
    /** Available branches */
    branches: Array<{
        name: string;
        isRemote?: boolean;
    }>;
    /** Available users for assignment */
    users?: MergeRequestUser[];
    /** Available labels */
    labels?: MergeRequestLabel[];
    /** Open issues */
    issues?: MergeRequestIssue[];
    /** Description templates */
    templates?: MergeRequestTemplate[];
    /** Diff summary */
    diff?: MergeRequestDiff;
    /** Current branch */
    currentBranch?: string;
    /** Default target branch */
    defaultTargetBranch?: string;
    /** Initial source branch */
    initialSourceBranch?: string;
    /** Platform type */
    platform?: 'github' | 'gitlab' | 'bitbucket' | 'azure';
    onSubmit?: (data: MergeRequestData) => void;
    onCancel?: () => void;
    onBranchChange?: (source: string, target: string) => void;
    onPreview?: (data: MergeRequestData) => void;
}

declare interface NicePipelineEditorProps extends NiceBaseProps {
    pipeline: Pipeline;
    templates: PipelineTemplate[];
    runners: Array<{
        id: string;
        name: string;
        os: string;
        available: boolean;
    }>;
    environments: Array<{
        id: string;
        name: string;
        protection: boolean;
    }>;
    onPipelineChange: (pipeline: Pipeline) => void;
    onStageAdd: () => void;
    onStageRemove: (stageId: string) => void;
    onStageMove: (stageId: string, direction: 'up' | 'down') => void;
    onJobAdd: (stageId: string) => void;
    onJobRemove: (stageId: string, jobId: string) => void;
    onStepAdd: (stageId: string, jobId: string) => void;
    onStepRemove: (stageId: string, jobId: string, stepId: string) => void;
    onVariableAdd: () => void;
    onVariableRemove: (name: string) => void;
    onSecretAdd: () => void;
    onSecretRemove: (name: string) => void;
    onTemplateApply: (template: PipelineTemplate) => void;
    onSave: () => void;
    onRun: () => void;
    onValidate: () => void;
}

declare interface NicePipelineMonitorProps extends NiceBaseProps {
    runs: PipelineRun[];
    stats?: PipelineStats;
    selectedRunId?: string;
    onRunSelect: (runId: string) => void;
    onCancel: (runId: string) => void;
    onRerun: (runId: string) => void;
    onRerunFromStage: (runId: string, stageId: string) => void;
    onDownloadArtifact: (artifact: PipelineArtifact) => void;
    onDownloadLogs: (runId: string) => void;
    onApprove?: (runId: string, stageId: string) => void;
    onReject?: (runId: string, stageId: string) => void;
    refreshInterval?: number;
}

/** A flow link between two {@link NiceSankeyNode} entries. */
declare interface NiceSankeyLink {
    /** Source node id. */
    source: string;
    /** Target node id. */
    target: string;
    /** Flow magnitude. */
    value: number;
}

/** A node in the {@link NiceSankey} diagram. */
declare interface NiceSankeyNode {
    /** Unique identifier. */
    id: string;
    /** Node label. */
    label: string;
    /** Node color. */
    color?: string;
}

/** Props for the {@link NiceSankey} component — an SVG Sankey flow diagram. */
declare interface NiceSankeyProps extends NiceBaseProps {
    /** Node definitions. */
    nodes: NiceSankeyNode[];
    /** Link definitions. */
    links: NiceSankeyLink[];
    /** SVG width in px. */
    width?: number;
    /** SVG height in px. */
    height?: number;
    /** Node rectangle width in px. */
    nodeWidth?: number;
    /** Vertical padding between nodes. */
    nodePadding?: number;
    /** Chart title. */
    title?: string;
}

declare interface NiceStateDesignerProps extends NiceBaseProps {
    /** Initial store definition */
    store?: StoreDefinition;
    /** Available state templates */
    templates?: StoreTemplate[];
    onStoreChange?: (store: StoreDefinition) => void;
    onExport?: (code: string, format: ExportFormat) => void;
    onSave?: (store: StoreDefinition) => void;
}

declare interface NiceTestBuilderProps extends NiceBaseProps {
    /** Target component name */
    componentName?: string;
    /** Test suites */
    testSuites?: TestSuite[];
    /** Available mock definitions */
    availableMocks?: MockDefinition[];
    onSuitesChange?: (suites: TestSuite[]) => void;
    onExport?: (code: string) => void;
    onRun?: (suiteId: string) => void;
    onRunAll?: () => void;
}

/** A hierarchical node in the {@link NiceTreeMap}. */
declare interface NiceTreeMapNode {
    /** Unique key. */
    key: string;
    /** Node label. */
    label: string;
    /** Numeric weight (determines area). */
    value: number;
    /** Node color. */
    color?: string;
    /** Child nodes. */
    children?: NiceTreeMapNode[];
}

/** Props for the {@link NiceTreeMap} component — a squarified treemap visualization. */
declare interface NiceTreeMapProps extends NiceBaseProps {
    /** Root node. */
    data: NiceTreeMapNode;
    /** SVG width in px. */
    width?: number;
    /** SVG height in px. */
    height?: number;
    /** Called when a leaf node is clicked. */
    onNodeClick?: (node: NiceTreeMapNode) => void;
    /** Color palette. */
    colors?: string[];
}

declare interface ParamDefinition {
    id: string;
    name: string;
    type: 'string' | 'number' | 'boolean' | 'array' | 'object';
    required?: boolean;
    defaultValue?: unknown;
    description?: string;
    validation?: ValidationRule[];
}

declare interface PersistConfig {
    enabled: boolean;
    key: string;
    storage: 'localStorage' | 'sessionStorage' | 'indexedDB' | 'custom';
    whitelist?: string[];
    blacklist?: string[];
    version?: number;
    migrate?: boolean;
}

declare interface Pipeline {
    id: string;
    name: string;
    description?: string;
    repository: string;
    branch?: string;
    triggers: PipelineTrigger[];
    stages: PipelineStage[];
    variables: PipelineVariable[];
    secrets: PipelineSecret[];
    isEnabled: boolean;
    createdAt: Date;
    updatedAt: Date;
}

declare interface PipelineArtifact {
    id: string;
    name: string;
    size: number;
    jobId: string;
    downloadUrl: string;
    expiresAt?: Date;
}

declare interface PipelineJob {
    id: string;
    name: string;
    runner?: string;
    environment?: string;
    steps: PipelineStep[];
    timeout?: number;
    condition?: string;
    services?: string[];
}

declare interface PipelineRun {
    id: string;
    pipelineId: string;
    pipelineName: string;
    runNumber: number;
    status: RunStatus;
    branch: string;
    commit: {
        sha: string;
        message: string;
        author: string;
        authorAvatar?: string;
    };
    trigger: 'push' | 'pull_request' | 'schedule' | 'manual' | 'api';
    startedAt?: Date;
    completedAt?: Date;
    duration?: number;
    stages: PipelineRunStage[];
    artifacts: PipelineArtifact[];
    environment?: string;
}

declare interface PipelineRunJob {
    id: string;
    name: string;
    status: JobStatus;
    runner?: string;
    startedAt?: Date;
    completedAt?: Date;
    duration?: number;
    steps: PipelineRunStep[];
}

declare interface PipelineRunStage {
    id: string;
    name: string;
    status: JobStatus;
    startedAt?: Date;
    completedAt?: Date;
    duration?: number;
    jobs: PipelineRunJob[];
}

declare interface PipelineRunStep {
    id: string;
    name: string;
    status: JobStatus;
    startedAt?: Date;
    completedAt?: Date;
    duration?: number;
    logs?: string[];
    errorMessage?: string;
}

declare interface PipelineSecret {
    name: string;
    source: 'vault' | 'environment' | 'repository';
    key: string;
}

declare interface PipelineStage {
    id: string;
    name: string;
    jobs: PipelineJob[];
    condition?: string;
    dependsOn?: string[];
    parallel: boolean;
}

declare interface PipelineStats {
    totalRuns: number;
    successRate: number;
    avgDuration: number;
    failedRuns: number;
    runsByDay: {
        date: string;
        success: number;
        failed: number;
    }[];
}

declare interface PipelineStep {
    id: string;
    name: string;
    type: 'script' | 'action' | 'checkout' | 'upload_artifact' | 'download_artifact' | 'docker' | 'deploy';
    script?: string;
    action?: string;
    actionVersion?: string;
    with?: Record<string, string>;
    env?: Record<string, string>;
    condition?: string;
    continueOnError?: boolean;
}

declare interface PipelineTemplate {
    id: string;
    name: string;
    description: string;
    category: string;
    icon: string;
    pipeline: Partial<Pipeline>;
}

declare type PipelineTrigger = 'push' | 'pull_request' | 'schedule' | 'manual' | 'tag' | 'workflow_dispatch';

declare interface PipelineVariable {
    name: string;
    value: string;
    isSecret: boolean;
    scope: 'pipeline' | 'stage' | 'job';
}

/**
 * Preload Data Branching module when user hovers over Data section
 */
export declare const preloadDataBranching: () => void;

/**
 * Preload DevOps module when user hovers over DevOps navigation
 */
export declare const preloadDevOps: () => void;

/**
 * Preload all heavy modules (use during idle time)
 */
export declare const preloadHeavyModules: () => void;

/**
 * Preload No-Code module when user hovers over No-Code navigation
 */
export declare const preloadNoCode: () => void;

declare interface ProtectionConfig {
    requireApproval: boolean;
    approversCount: number;
    requireBackup: boolean;
    allowDirectChanges: boolean;
    restrictTables?: string[];
}

declare interface ProviderConfig {
    name: string;
    props?: Record<string, unknown>;
}

declare interface RecordDiff {
    id: string;
    changeType: ChangeType;
    primaryKey: Record<string, unknown>;
    fields: DataFieldDiff[];
    changedAt?: Date;
    changedBy?: string;
}

declare interface ReducerStep {
    id: string;
    type: 'set' | 'update' | 'push' | 'remove' | 'reset' | 'custom';
    field: string;
    value?: string;
    condition?: string;
}

declare interface ResponseDefinition {
    status: number;
    description?: string;
    schema?: SchemaDefinition;
    headers?: Record<string, string>;
}

declare interface RetentionPolicy {
    enabled: boolean;
    maxCount?: number;
    maxAgeDays?: number;
    keepTagged?: boolean;
    keepLocked?: boolean;
}

declare interface RetryConfig {
    enabled: boolean;
    maxAttempts: number;
    backoff: 'linear' | 'exponential';
    retryOn?: number[];
}

declare type RunStatus = 'queued' | 'in_progress' | 'completed' | 'failed' | 'cancelled' | 'waiting' | 'skipped';

declare interface SchemaDefinition {
    type: 'object' | 'array' | 'string' | 'number' | 'boolean';
    properties?: Record<string, SchemaDefinition>;
    items?: SchemaDefinition;
    required?: string[];
}

declare interface SchemaDefinition_2 {
    name: string;
    type: 'object' | 'array';
    fields: FieldDefinition[];
}

declare interface SchemaInfo {
    id: string;
    name: string;
    schema: SchemaDefinition_2;
}

declare interface Snapshot {
    id: string;
    name: string;
    description?: string;
    environment: DataEnvironment;
    createdAt: Date;
    createdBy: {
        id: string;
        name: string;
    };
    size: {
        records: number;
        bytes: number;
    };
    type: 'manual' | 'scheduled' | 'pre-merge' | 'pre-restore';
    status: 'creating' | 'ready' | 'failed' | 'expired' | 'locked';
    tables?: string[];
    tags?: string[];
    expiresAt?: Date;
}

declare interface SnapshotSchedule {
    id: string;
    name: string;
    cron: string;
    enabled: boolean;
    nextRun?: Date;
    lastRun?: Date;
    retainCount?: number;
}

declare interface StateAction {
    id: string;
    name: string;
    description?: string;
    params: ActionParam[];
    reducerSteps: ReducerStep[];
    async?: boolean;
    errorHandling?: 'throw' | 'catch' | 'ignore';
}

declare interface StateField {
    id: string;
    name: string;
    type: FieldType;
    defaultValue?: unknown;
    nullable?: boolean;
    description?: string;
}

declare interface StateSelector {
    id: string;
    name: string;
    description?: string;
    dependencies: string[];
    expression: string;
    memoized?: boolean;
}

declare interface StateSlice {
    id: string;
    name: string;
    description?: string;
    state: StateField[];
    actions: StateAction[];
    selectors: StateSelector[];
    computed?: ComputedField[];
}

declare interface StoreDefinition {
    id: string;
    name: string;
    description?: string;
    slices: StateSlice[];
    middleware?: MiddlewareConfig[];
    persist?: PersistConfig;
    devtools?: DevToolsConfig;
}

declare interface StoreTemplate {
    id: string;
    name: string;
    description: string;
    icon: string;
    store: Partial<StoreDefinition>;
}

declare interface SyncSchedule {
    enabled: boolean;
    frequency: 'manual' | 'hourly' | 'daily' | 'weekly';
    lastSync?: VersioningTimestamp;
    nextSync?: VersioningTimestamp;
    direction: 'push' | 'pull' | 'bidirectional';
}

declare interface TableDiffSummary {
    table: string;
    displayName: string;
    module?: string;
    added: number;
    modified: number;
    deleted: number;
    records: RecordDiff[];
}

declare interface TableInfo {
    name: string;
    displayName: string;
    recordCount: number;
    sizeBytes: number;
    module?: string;
    hasForeignKeys?: boolean;
}

declare type TemplateEngine = 'handlebars' | 'ejs' | 'mustache' | 'simple';

declare interface TemplateFile {
    id: string;
    name: string;
    path: string;
    content: string;
    language?: string;
    condition?: string;
}

declare interface TemplateVariable {
    id: string;
    name: string;
    type: 'string' | 'number' | 'boolean' | 'array' | 'object' | 'select';
    defaultValue?: unknown;
    description?: string;
    required?: boolean;
    options?: string[];
    validation?: {
        pattern?: string;
        minLength?: number;
        maxLength?: number;
        min?: number;
        max?: number;
    };
}

declare type TestAction = 'render' | 'click' | 'type' | 'select' | 'hover' | 'focus' | 'blur' | 'submit' | 'keypress' | 'wait' | 'scroll' | 'drag' | 'assert' | 'snapshot' | 'a11y-check';

declare interface TestCase {
    id: string;
    name: string;
    description?: string;
    type: TestType;
    steps: TestStep[];
    expectedResult?: ExpectedResult;
    timeout?: number;
    skip?: boolean;
    only?: boolean;
}

declare interface TestSetup {
    mocks: MockConfig[];
    providers?: ProviderConfig[];
    props?: Record<string, unknown>;
}

declare interface TestStep {
    id: string;
    action: TestAction;
    target?: string;
    value?: unknown;
    waitFor?: WaitCondition;
}

declare interface TestSuite {
    id: string;
    name: string;
    description?: string;
    componentName: string;
    setup?: TestSetup;
    tests: TestCase[];
    teardown?: TestTeardown;
}

declare interface TestTeardown {
    cleanup?: string[];
}

declare type TestType = 'unit' | 'integration' | 'e2e' | 'snapshot' | 'accessibility';

declare interface Transformation {
    id: string;
    name: string;
    type: TransformType;
    config: TransformConfig;
}

declare interface TransformConfig {
    expression?: string;
    format?: string;
    convertTo?: DataType;
    separator?: string;
    lookupTable?: Record<string, unknown>;
    condition?: string;
    thenValue?: unknown;
    elseValue?: unknown;
}

declare type TransformType = 'direct' | 'format' | 'convert' | 'concat' | 'split' | 'calculate' | 'lookup' | 'conditional' | 'custom';

declare interface ValidationRule {
    type: 'required' | 'min' | 'max' | 'pattern' | 'enum';
    value?: unknown;
    message?: string;
}

declare interface ValidationRule_2 {
    id: string;
    field: string;
    type: ValidationType;
    value?: unknown;
    message?: string;
}

declare type ValidationType = 'required' | 'type' | 'min' | 'max' | 'pattern' | 'enum' | 'custom';

/** Author/User information */
declare interface VersioningAuthor {
    id: string;
    name: string;
    email?: string;
    avatar?: string;
}

/** Base branch representation */
declare interface VersioningBranch extends VersioningId {
    name: string;
    displayName?: string;
    description?: string;
    isDefault: boolean;
    isProtected: boolean;
    createdBy: VersioningAuthor;
    createdAt: VersioningTimestamp;
    lastActivity?: VersioningTimestamp;
    upstream?: string;
    status: BranchStatus;
    metadata?: Record<string, unknown>;
}

/**
 * NiceVersioningCore — Shared abstraction for Git and Data Branching
 * @nice2dev/ui - Versioning System
 *
 * Provides common types, hooks, and utilities for:
 * - Git version control (code)
 * - Data Branching (ERP data)
 */
/** Base versioning entity identifier */
declare interface VersioningId {
    id: string;
    shortId: string;
}

/** Timestamp with timezone */
declare interface VersioningTimestamp {
    date: Date;
    timezone?: string;
    relative?: string;
}

declare interface WaitCondition {
    type: 'timeout' | 'element' | 'text' | 'api' | 'state';
    value: unknown;
    timeout?: number;
}

export { }
