import { CdkScrollable } from '@angular/cdk/scrolling';
import { AfterViewInit, EventEmitter, InjectionToken, Provider } from '@angular/core';
import { KbqButtonStyles } from '@koobiq/components/button';
import { KbqCodeBlockLocaleConfiguration, KbqComponentColors } from '@koobiq/components/core';
import { KbqCodeBlockFile } from './types';
import * as i0 from "@angular/core";
/** Localization configuration provider. */
export declare const KBQ_CODE_BLOCK_LOCALE_CONFIGURATION: InjectionToken<KbqCodeBlockLocaleConfiguration>;
/** Utility provider for `KBQ_CODE_BLOCK_LOCALE_CONFIGURATION`. */
export declare const kbqCodeBlockLocaleConfigurationProvider: (configuration: KbqCodeBlockLocaleConfiguration) => Provider;
/** Fallback file name for code block if file name is not specified. */
export declare const KBQ_CODE_BLOCK_FALLBACK_FILE_NAME: InjectionToken<string>;
/** Utility provider for `KBQ_CODE_BLOCK_FALLBACK_FILE_NAME`. */
export declare const kbqCodeBlockFallbackFileNameProvider: (fileName: string) => Provider;
/**
 * Component which highlights blocks of code.
 */
export declare class KbqCodeBlock implements AfterViewInit {
    private readonly copyButtonTooltip?;
    /**
     * Reference to the scrollable code content.
     */
    readonly scrollableCodeContent: CdkScrollable;
    /** Whether to display line numbers. */
    lineNumbers: boolean;
    /** Whether the code block should be filled. */
    filled: boolean;
    /** Added soft wrap toggle button.  */
    canToggleSoftWrap: boolean;
    /** Whether sequences of whitespace should be preserved. */
    softWrap: boolean;
    /**
     * Output to support two-way binding on `[(softWrap)]` property.
     */
    readonly softWrapChange: EventEmitter<boolean>;
    /**
     * Allows to view all the code, otherwise it will be hidden.
     * Works only with `maxHeight` property.
     */
    viewAll: boolean;
    /**
     * Output to support two-way binding on `[(viewAll)]` property.
     */
    readonly viewAllChange: EventEmitter<boolean>;
    /**
     * Maximum height of the code block content, other parts will be hidden.
     * Can be toggled by `viewAll` property.
     */
    maxHeight: number;
    /**
     * @docs-private
     */
    protected get calculatedMaxHeight(): number | null;
    /**
     * @deprecated Will be removed in next major release, use `canDownload` instead.
     *
     * @docs-private
     */
    set canLoad(value: boolean);
    /** Added download code button. */
    canDownload: boolean;
    /** Added copy code button. */
    canCopy: boolean;
    /**
     * @deprecated Will be removed in next major release, use `files` instead.
     */
    set codeFiles(files: KbqCodeBlockFile[]);
    /**
     * @TODO Mark as `required`, after removing `codeFiles`
     *
     * Files to display.
     */
    get files(): KbqCodeBlockFile[];
    set files(files: KbqCodeBlockFile[]);
    private _files;
    /** Defines which file (index) is active. */
    activeFileIndex: number;
    /**
     * Output to support two-way binding on `[(activeFileIndex)]` property.
     */
    readonly activeFileIndexChange: EventEmitter<number>;
    /** Whether to hide border. */
    noBorder: boolean;
    /**
     * Whether to hide header tabs.
     * Always `true` if there is only one file without filename.
     * Makes actionbar floating if tabs are hidden.
     */
    get hideTabs(): boolean;
    set hideTabs(value: boolean);
    private _hideTabs;
    /**
     * Component locale configuration.
     *
     * @docs-private
     */
    protected get localeConfiguration(): KbqCodeBlockLocaleConfiguration;
    private _localeConfiguration;
    /**
     * Code content tab index.
     *
     * @docs-private
     */
    protected get codeContentTabIndex(): number;
    /**
     * Determines whether the code content can be focused.
     *
     * This checks if the scrollable code content element is present,
     * has a scroll, and the calculated maximum height is not set.
     */
    private get canCodeContentBeFocused();
    /**
     * @docs-private
     */
    protected readonly componentColor: typeof KbqComponentColors;
    /**
     * @docs-private
     */
    protected readonly buttonStyle: typeof KbqButtonStyles;
    private readonly elementRef;
    private readonly changeDetectorRef;
    private readonly localeService;
    private readonly destroyRef;
    private readonly renderer;
    private readonly platform;
    private readonly focusMonitor;
    private readonly clipboard;
    private readonly domSanitizer;
    private readonly document;
    /**
     * @docs-private
     */
    protected readonly fallbackFileName: string;
    private readonly window;
    constructor();
    ngAfterViewInit(): void;
    /**
     * Toggles the `viewAll` property.
     *
     * When `viewAll` is set to `true`, the content of the code block will be
     * displayed in its entirety. When set to `false`, the content will be
     * limited to the `maxHeight` property. If the content exceeds the
     * `maxHeight`, it will be scrolled to the top and the `viewAll` button
     * will be displayed.
     */
    toggleViewAll(): void;
    /**
     * Toggles `softWrap` property.
     *
     * When `softWrap` is set to `true`, the content of the code block will be
     * wrapped if it exceeds the height of the component. When set to `false`
     * the content will not be wrapped.
     */
    toggleSoftWrap(): void;
    /**
     * Handles the change of the selected tab by updating the active file index
     * and scrolling to the top of the scrollable content.
     *
     * @param index - The index of the newly selected tab.
     *
     * @docs-private
     */
    protected onSelectedTabChange(index: number): void;
    /**
     * Handles the hover event on the code block element and updates the actionbar display accordingly.
     */
    private handleHover;
    /**
     * Handles the scroll event on the scrollable code content element and updates the header shadow accordingly.
     */
    private handleScroll;
    /**
     * Adds or removes the shadow class from the code block based on the specified condition.
     *
     * @param shouldShowShadow - A boolean indicating whether to add or remove the shadow class.
     */
    private setupHeaderShadow;
    /**
     * Adds or removes the actionbar display class from the code block based on the specified condition.
     *
     * The actionbar is always visible on mobile devices and when the tabs are visible.
     * Otherwise, the actionbar is only visible when the mouse is hovered over the code block.
     *
     * @param shouldShowActionbar - A boolean indicating whether the actionbar should be visible.
     */
    private setupActionbarDisplay;
    /** Whether the element has scroll. */
    private hasScroll;
    /**
     * Handles the enter keydown event on `viewAll` button.
     *
     * @docs-private
     */
    protected onViewAllEnterKeydown(event: Event): void;
    private updateLocaleParams;
    /**
     * Copies the file code to the clipboard.
     *
     * If the copy was successful, the copy button tooltip content is updated
     * to show the "copied" message.
     *
     * @docs-private
     */
    protected copyCode(): void;
    /**
     * Opens the file link in a new window.
     *
     * @docs-private
     */
    protected openLink(): void;
    /**
     * Downloads the file as a blob.
     *
     * Creates a link with a blob as href and the file name as download attribute.
     * Then simulates a click event on the link to initiate the download.
     *
     * @docs-private
     */
    protected downloadCode(): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<KbqCodeBlock, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<KbqCodeBlock, "kbq-code-block", ["kbqCodeBlock"], { "lineNumbers": { "alias": "lineNumbers"; "required": false; }; "filled": { "alias": "filled"; "required": false; }; "canToggleSoftWrap": { "alias": "canToggleSoftWrap"; "required": false; }; "softWrap": { "alias": "softWrap"; "required": false; }; "viewAll": { "alias": "viewAll"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; "canLoad": { "alias": "canLoad"; "required": false; }; "canDownload": { "alias": "canDownload"; "required": false; }; "canCopy": { "alias": "canCopy"; "required": false; }; "codeFiles": { "alias": "codeFiles"; "required": false; }; "files": { "alias": "files"; "required": false; }; "activeFileIndex": { "alias": "activeFileIndex"; "required": false; }; "noBorder": { "alias": "noBorder"; "required": false; }; "hideTabs": { "alias": "hideTabs"; "required": false; }; }, { "softWrapChange": "softWrapChange"; "viewAllChange": "viewAllChange"; "activeFileIndexChange": "activeFileIndexChange"; }, never, never, true, never>;
    static ngAcceptInputType_lineNumbers: unknown;
    static ngAcceptInputType_filled: unknown;
    static ngAcceptInputType_canToggleSoftWrap: unknown;
    static ngAcceptInputType_softWrap: unknown;
    static ngAcceptInputType_viewAll: unknown;
    static ngAcceptInputType_maxHeight: unknown;
    static ngAcceptInputType_canLoad: unknown;
    static ngAcceptInputType_canDownload: unknown;
    static ngAcceptInputType_canCopy: unknown;
    static ngAcceptInputType_activeFileIndex: unknown;
    static ngAcceptInputType_noBorder: unknown;
    static ngAcceptInputType_hideTabs: unknown;
}
