import * as _angular_core from '@angular/core';
import { OnChanges, TemplateRef, EventEmitter, SimpleChanges, AfterContentInit, QueryList, Signal } from '@angular/core';
import { TranslatableString } from '@siemens/element-translate-ng/translate';

/**
 * Copyright (c) Siemens 2016 - 2026
 * SPDX-License-Identifier: MIT
 */
/** */
type CollapseTo = 'start' | 'end';
type SplitOrientation = 'horizontal' | 'vertical';
type Scale = 'none' | 'auto';
interface Action {
    iconClass: string;
    tooltip: string;
    click: (evt: Event) => void;
}
interface PartState {
    expanded?: boolean;
    size?: number;
}

declare class SiSplitPartComponent implements OnChanges {
    /** @defaultValue [] */
    actions: Action[];
    /**
     * @defaultValue 'start'
     */
    collapseDirection: CollapseTo;
    /**
     * Sets the icon class that is used in the buttons of split parts to
     * collapse and uncollapse the parts.
     *
     * @defaultValue 'element-double-right'
     */
    collapseIconClass: string;
    /**
     * Collapse only to the given min size.
     *
     * @defaultValue false
     */
    collapseToMinSize: boolean;
    headerTemplate?: TemplateRef<any>;
    /**
     * Sets the title of the split part header.
     */
    heading: TranslatableString;
    /**
     * Minimum size in px.
     *
     * @defaultValue 0
     */
    minSize: number;
    /**
     * When a split part is collapsed, the content gets hidden but it will
     * still remain within the DOM. If you want to remove and destroy the component
     * in collapsed mode and recreate it on un-collapse, set this property to
     * true.
     *
     * @defaultValue false
     */
    removeContentOnCollapse: boolean;
    /**
     * Defines the behavior of the split part during scaling.
     * E.g. when set to `none`, the spit part will keep its current size even when the parent container grows or shrinks.
     *
     * @defaultValue 'auto'
     */
    scale: Scale;
    /**
     * Defines if the collapse button of a split part is displayed. Default value is true.
     *
     * @defaultValue true
     */
    showCollapseButton: boolean;
    /**
     * Defines if the header of the split part is visible. Default is true.
     *
     * @defaultValue true
     */
    showHeader: boolean;
    /**
     * Aria label for collapse button. Needed for a11y
     *
     * @defaultValue 'collapse'
     */
    collapseLabel: TranslatableString;
    /**
     * An optional stateId to uniquely identify a component instance.
     * Required for persistence of ui state.
     */
    stateId?: string;
    /**
     * Expanded size in px.
     */
    size?: number;
    /**
     * This toggles the behavior when collapsing this split part.
     * If enabled, all split parts between this one and the end of the split in the respective direction will be collapsed if this part is collapsed.
     * If disabled, only this split part will be collapsed.
     *
     * @defaultValue false
     */
    collapseOthers: boolean;
    readonly collapseChanged: EventEmitter<boolean>;
    readonly stateChange: EventEmitter<PartState>;
    /** @internal */
    index: number;
    /** @internal */
    before?: SiSplitPartComponent;
    /** @internal */
    after?: SiSplitPartComponent;
    /** @internal */
    readonly fractionalSize: _angular_core.WritableSignal<number | undefined>;
    /** @internal */
    readonly collapsedSize: _angular_core.WritableSignal<number>;
    /** @internal */
    readonly collapsedState: _angular_core.WritableSignal<boolean>;
    /**
     * Get collapsed state.
     * @returns True if the split part is collapsed, false is expanded.
     */
    get collapsed(): boolean;
    /** @internal */
    readonly expandedSize: _angular_core.WritableSignal<number | undefined>;
    /** @internal */
    readonly actualSize: _angular_core.Signal<number>;
    /** @internal */
    saveUIState: () => void;
    /** @internal */
    readonly nextExpandedAfter: _angular_core.Signal<SiSplitPartComponent>;
    private elementRef;
    protected headerContext: {
        $implicit: SiSplitPartComponent;
    };
    /** @defaultValue true */
    set expanded(value: boolean);
    get expanded(): boolean;
    ngOnChanges(changes: SimpleChanges<this>): void;
    /** @internal */
    refreshSizePx(orientation: SplitOrientation): void;
    /**
     * Toggles the collapsed or expanded state.
     */
    toggleCollapse(): void;
    private refreshCollapsedToEnd;
    private refreshCollapseToStart;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiSplitPartComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiSplitPartComponent, "si-split-part", never, { "actions": { "alias": "actions"; "required": false; }; "collapseDirection": { "alias": "collapseDirection"; "required": false; }; "collapseIconClass": { "alias": "collapseIconClass"; "required": false; }; "collapseToMinSize": { "alias": "collapseToMinSize"; "required": false; }; "headerTemplate": { "alias": "headerTemplate"; "required": false; }; "heading": { "alias": "heading"; "required": false; }; "minSize": { "alias": "minSize"; "required": false; }; "removeContentOnCollapse": { "alias": "removeContentOnCollapse"; "required": false; }; "scale": { "alias": "scale"; "required": false; }; "showCollapseButton": { "alias": "showCollapseButton"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "collapseLabel": { "alias": "collapseLabel"; "required": false; }; "stateId": { "alias": "stateId"; "required": false; }; "size": { "alias": "size"; "required": false; }; "collapseOthers": { "alias": "collapseOthers"; "required": false; }; "expanded": { "alias": "expanded"; "required": false; }; }, { "collapseChanged": "collapseChanged"; "stateChange": "stateChange"; }, never, ["*"], true, never>;
    static ngAcceptInputType_collapseToMinSize: unknown;
    static ngAcceptInputType_minSize: unknown;
    static ngAcceptInputType_removeContentOnCollapse: unknown;
    static ngAcceptInputType_showCollapseButton: unknown;
    static ngAcceptInputType_showHeader: unknown;
    static ngAcceptInputType_size: unknown;
    static ngAcceptInputType_collapseOthers: unknown;
    static ngAcceptInputType_expanded: unknown;
}

interface Gutter {
    before: SiSplitPartComponent;
    after: SiSplitPartComponent;
    visible: Signal<boolean>;
}
declare class SiSplitComponent implements AfterContentInit, OnChanges {
    /** @defaultValue 16 */
    gutterSize: number;
    protected readonly _orientation: _angular_core.WritableSignal<SplitOrientation>;
    get orientation(): SplitOrientation;
    set orientation(value: SplitOrientation);
    /** @defaultValue [] */
    sizes: number[];
    /**
     * An optional stateId to uniquely identify a component instance.
     * Required for persistence of ui state.
     */
    stateId?: string;
    readonly sizesChange: EventEmitter<number[]>;
    protected parts: QueryList<SiSplitPartComponent>;
    protected gutters: Gutter[];
    protected gridTemplateRows: Signal<string>;
    protected gridTemplateColumns: Signal<string>;
    protected gridTemplateAreas: Signal<string>;
    private elementRef;
    private ngZone;
    private changeDetectorRef;
    private document;
    private uiStateService;
    private fractionalSizeToExpandedSizeFactor;
    ngOnChanges(changes: SimpleChanges<this>): void;
    ngAfterContentInit(): void;
    private alignRelativeSizes;
    private updateFractionalSizeToExpandSizeFactor;
    private refreshAllPartSizes;
    protected resizeStart(gutter: Gutter, event: Event): void;
    private measureContainerSize;
    private getPosition;
    private saveUIState;
    private restoreFormUIState;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiSplitComponent, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiSplitComponent, "si-split", never, { "gutterSize": { "alias": "gutterSize"; "required": false; }; "orientation": { "alias": "orientation"; "required": false; }; "sizes": { "alias": "sizes"; "required": false; }; "stateId": { "alias": "stateId"; "required": false; }; }, { "sizesChange": "sizesChange"; }, ["parts"], ["*"], true, never>;
}

declare class SiSplitModule {
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiSplitModule, never>;
    static ɵmod: _angular_core.ɵɵNgModuleDeclaration<SiSplitModule, never, [typeof SiSplitComponent, typeof SiSplitPartComponent], [typeof SiSplitComponent, typeof SiSplitPartComponent]>;
    static ɵinj: _angular_core.ɵɵInjectorDeclaration<SiSplitModule>;
}

export { SiSplitComponent, SiSplitModule, SiSplitPartComponent };
export type { Action, CollapseTo, PartState, Scale, SplitOrientation };
