import { default as CxButton } from '../../../atoms/src/components/button/button.ts';
import { default as CxDialog } from '../../../atoms/src/components/dialog/dialog.ts';
import { default as CxIconButton } from '../../../atoms/src/components/icon-button/icon-button.ts';
import { default as CxSpace } from '../../../atoms/src/components/space/space.ts';
import { default as CxSpinner } from '../../../atoms/src/components/spinner/spinner.ts';
import { default as CxTypography } from '../../../atoms/src/components/typography/typography.ts';
import { default as CortexElement } from '../../../base/src/cortex-element.ts';
import { default as CxCropper } from '../../../molecules/src/cropper/cropper.ts';
import { Transformation } from '../../../types/src/asset-link-format';
import { default as CxAssetLinkFormat } from '../asset-link-format/asset-link-format';

/**
 * @summary Dialog that wraps `cx-cropper` and `cx-asset-link-format` side by side,
 * allowing users to preview and apply image transformations.
 *
 * @slot trigger - Opens the dialog on click or keyboard activation. Typically a `cx-button` or
 *   `cx-icon-button`. Automatically disabled when `asset-id` is not set.
 *
 * @event cx-asset-transformation-dialog-cancel - Emitted when the user closes or cancels the dialog.
 * @event {{ detail: { format: string; transformations: Transformation[] } }} cx-asset-transformation-dialog-confirm - Emitted when the user saves, with the selected proxy id and transformation array.
 * @event cx-asset-transformation-dialog-delete - Emitted when the user clears the saved transformations via the delete button.
 */
export default class CxAssetTransformationDialog extends CortexElement {
    static readonly styles: import('lit').CSSResult[];
    static readonly dependencies: {
        'cx-asset-link-format': typeof CxAssetLinkFormat;
        'cx-button': typeof CxButton;
        'cx-cropper': typeof CxCropper;
        'cx-dialog': typeof CxDialog;
        'cx-icon-button': typeof CxIconButton;
        'cx-space': typeof CxSpace;
        'cx-spinner': typeof CxSpinner;
        'cx-typography': typeof CxTypography;
    };
    private readonly localize;
    private readonly fetchAssetController;
    private readonly hasSlotController;
    private apiGetAvailableProxies;
    /** Stores the accessible trigger element for focus return and ARIA updates. */
    private accessibleTrigger;
    private readonly triggerSlot;
    private readonly assetLinkFormat;
    private readonly cropperEl;
    /** Asset ID used to fetch asset data when the dialog opens. */
    assetId: string;
    /** Controls dialog open/close state. */
    open: boolean;
    /** Boundary element for cx-dialog positioning. */
    boundary: HTMLElement;
    baseUrl: string;
    /** Authentication token passed to the asset service. */
    token: string;
    /** Currently selected proxy format, passed back into cx-asset-link-format on reopen. */
    format: string;
    /** The default format to fall back to if the asset has no transformations or selected proxy. */
    defaultFormat: string;
    /** Optional label rendered as the dialog title. Falls back to the localized "Asset format" term. */
    dialogLabel: string;
    /** The transformations applied when the user last saved, passed back into cx-asset-link-format on reopen. */
    transformations: Transformation[];
    /** Show stack of layers indicating the transformations will be applied to multiple assets. */
    multiple: boolean;
    /** Hide the crop panel inside cx-asset-link-format. */
    noCrop: boolean;
    /** Hide the resize panel inside cx-asset-link-format. */
    noResize: boolean;
    /** Hide the rotate panel inside cx-asset-link-format. */
    noRotate: boolean;
    /** Show a Reset button inside cx-asset-link-format that clears all transformations. */
    canReset: boolean;
    /** Asset data fetched on cx-show. */
    private asset;
    /** Available proxy formats fetched alongside the asset. */
    private proxies;
    private get hasTransformations();
    handleAssetIdChange(): Promise<void>;
    handleOpenChange(): void;
    /** Syncs disabled state and ARIA attributes on the slotted trigger element.
     * For cx-button/cx-icon-button, ARIA is set on the inner <button> so screen readers
     * announce the correct role/state rather than the custom-element host. */
    private updateAccessibleTrigger;
    /** Fetches the asset and its available proxies when the dialog opens.
     * Guards on `result.id` because `fetchAssetByID` returns `{}` on network error. */
    private handleDialogShow;
    private handleTriggerClick;
    private handleTriggerKeyDown;
    /** Prevents the default scroll action for Space on keyup (some browsers fire scroll on keyup). */
    private handleTriggerKeyUp;
    private handleTriggerSlotChange;
    private handleClose;
    private handleDeleteClick;
    private handleRequestClose;
    private handleSave;
    private handleCancel;
    private handleAssetLinkFormatShow;
    render(): import('lit').TemplateResult<1>;
}
declare global {
    interface HTMLElementTagNameMap {
        'cx-asset-transformation-dialog': CxAssetTransformationDialog;
    }
}
