/// <reference path="../../index.d.ts" />
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
import type { HeadingLevel } from "../functional/Heading.js";
import type { FlipPlacement, LogicalPlacement, OverlayPositioning } from "../../utils/floating-ui.js";
import type { CollapseDirection, Scale } from "../interfaces.js";
import type { IconName } from "../calcite-icon/interfaces.js";

/**
 * @cssproperty [--calcite-panel-corner-radius] - Specifies the component's corner radius.
 * @cssproperty [--calcite-panel-heading-text-color] - Specifies the text color of the component's `heading`.
 * @cssproperty [--calcite-panel-icon-color] - Specifies the color of the component's icon.
 * @cssproperty [--calcite-panel-description-text-color] - Specifies the text color of the component's `description`.
 * @cssproperty [--calcite-panel-border-color] - Specifies the component's border color.
 * @cssproperty [--calcite-panel-background-color] - Specifies the component's background color.
 * @cssproperty [--calcite-panel-header-background-color] - Specifies the background color of the component's header.
 * @cssproperty [--calcite-panel-header-action-background-color] - Specifies the background color of the component's `closable`, `collapsible`, and elements slotted in `header-menu-actions`.
 * @cssproperty [--calcite-panel-header-action-background-color-hover] - Specifies the background color of the component's `closable`, `collapsible`, and elements slotted in `header-menu-actions` when hovered.
 * @cssproperty [--calcite-panel-header-action-background-color-press] - Specifies the background color of the component's `closable`, `collapsible`, and elements slotted in `header-menu-actions` when pressed.
 * @cssproperty [--calcite-panel-header-action-text-color] - Specifies the text color of the component's `closable`, `collapsible`, and elements slotted in `header-menu-actions`.
 * @cssproperty [--calcite-panel-header-action-text-color-press] - Specifies the text color of the component's `closable`, `collapsible`, and elements slotted in `header-menu-actions` when pressed or hovered.
 * @cssproperty [--calcite-panel-footer-background-color] - Specifies the background color of the component's footer.
 * @cssproperty [--calcite-panel-space] - Specifies the padding of the component's `"unnamed (default)"` slot.
 * @cssproperty [--calcite-panel-header-content-space] - Specifies the padding of the `"header-content"` slot.
 * @cssproperty [--calcite-panel-footer-space] - Specifies the padding of the component's footer.
 * @cssproperty [--calcite-popover-border-color] - Specifies the border color of the component's internally rendered `calcite-popover`, which is rendered within a `calcite-action` menu when slotted `calcite-action`s are present in the `header-actions-end` slot. Applies to any slotted `calcite-popover`s.
 * @cssproperty [--calcite-panel-content-space] - [Deprecated] Use `--calcite-panel-space` instead. Specifies the padding of the component's content.
 * @cssproperty [--calcite-panel-footer-padding] - [Deprecated] Use `--calcite-panel-footer-space` instead. Specifies the padding of the component's footer.
 * @cssproperty [--calcite-panel-header-border-block-end] - [Deprecated] Use `--calcite-panel-border-color` instead. Specifies the component header's block end border.
 * @slot  - A slot for adding custom content.
 * @slot [action-bar] - A slot for adding a `calcite-action-bar` to the component.
 * @slot [alerts] - A slot for adding `calcite-alert`s to the component.
 * @slot [content-bottom] - A slot for adding content below the unnamed (default) slot and above the footer slot (if populated).
 * @slot [content-top] - A slot for adding content above the unnamed (default) slot and below the action-bar slot (if populated).
 * @slot [header-actions-start] - A slot for adding actions or content to the start side of the header.
 * @slot [header-actions-end] - A slot for adding actions or content to the end side of the header.
 * @slot [header-content] - A slot for adding custom content to the header.
 * @slot [header-menu-actions] - A slot for adding an overflow menu with actions inside a `calcite-dropdown`.
 * @slot [fab] - A slot for adding a `calcite-fab` (floating action button) to perform an action.
 * @slot [footer] - A slot for adding custom content to the component's footer. Should not be used with the `"footer-start"` or `"footer-end"` slots.
 * @slot [footer-end] - A slot for adding custom content to a trailing footer. Should not be used with the `"footer"` slot.
 * @slot [footer-start] - A slot for adding custom content to a leading footer. Should not be used with the `"footer"` slot.
 */
export abstract class Panel extends LitElement {
  /** Passes a function to run before the component closes. */
  accessor beforeClose: () => Promise<void>;
  /**
   * When `true`, displays a close button in the component.
   *
   * @default false
   */
  accessor closable: boolean;
  /**
   * When `true`, the component will be hidden.
   *
   * @default false
   */
  accessor closed: boolean;
  /**
   * When `true`, hides the component's content area.
   *
   * @default false
   */
  accessor collapsed: boolean;
  /**
   * When `collapsible` is `true`, specifies the direction of the collapse icon.
   *
   * @default "down"
   */
  accessor collapseDirection: CollapseDirection;
  /**
   * When `true`, the component is collapsible.
   *
   * @default false
   */
  accessor collapsible: boolean;
  /** Specifies a description for the component. */
  accessor description: string;
  /**
   * When `true`, interaction is prevented and the component is displayed with lower opacity.
   *
   * @default false
   */
  accessor disabled: boolean;
  /** Specifies the component's heading text. */
  accessor heading: string;
  /** Specifies the heading level number of the component's `heading` for proper document structure, without affecting visual styling. */
  accessor headingLevel: HeadingLevel;
  /** Specifies an icon to display. */
  accessor icon: IconName;
  /**
   * When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`).
   *
   * @default false
   */
  accessor iconFlipRtl: boolean;
  /**
   * When `true`, a busy indicator is displayed.
   *
   * @default false
   */
  accessor loading: boolean;
  /** Specifies the component's fallback `menuPlacement` when it's initial or specified `menuPlacement` has insufficient space available. */
  accessor menuFlipPlacements: FlipPlacement[];
  /**
   * When `true`, the action menu items in the `header-menu-actions` slot are open.
   *
   * @default false
   */
  accessor menuOpen: boolean;
  /**
   * Determines where the action menu will be positioned.
   *
   * @default "bottom-end"
   */
  accessor menuPlacement: LogicalPlacement;
  /** Overrides individual strings used by the component. */
  accessor messageOverrides: {
      close?: string;
      options?: string;
      collapse?: string;
      expand?: string;
  };
  /**
   * Specifies the type of positioning to use for overlaid content, where:
   *
   * `"absolute"` works for most cases - positioning the component inside of overflowing parent containers, which affects the container's layout, and
   *
   * `"fixed"` is used to escape an overflowing parent container, or when the reference element's `position` CSS property is `"fixed"`.
   *
   * @default "absolute"
   */
  accessor overlayPositioning: OverlayPositioning;
  /**
   * Specifies the size of the component.
   *
   * @default "m"
   */
  accessor scale: Scale;
  /**
   * When `true` and the component is `open`, disables top layer placement.
   *
   * Only set this if you need complex z-index control or if top layer placement causes conflicts with third-party components.
   *
   * @default false
   * @mdn [Top Layer](https://developer.mozilla.org/en-US/docs/Glossary/Top_layer)
   */
  accessor topLayerDisabled: boolean;
  /**
   * Scrolls the component's content to a specified set of coordinates.
   *
   * @param options - allows specific coordinates to be defined.
   * @returns promise that resolves once the content is scrolled to.
   * @example
   * myCalciteFlowItem.scrollContentTo({
   *   left: 0, // Specifies the number of pixels along the X axis to scroll the window or element.
   *   top: 0, // Specifies the number of pixels along the Y axis to scroll the window or element
   *   behavior: "auto" // Specifies whether the scrolling should animate smoothly (smooth), or happen instantly in a single jump (auto, the default value).
   * });
   */
  scrollContentTo(options?: ScrollToOptions): Promise<void>;
  /**
   * Sets focus on the component's first focusable element.
   *
   * @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
   * @mdn [focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
   */
  setFocus(options?: FocusOptions): Promise<void>;
  /** Fires when the close button is clicked. */
  readonly calcitePanelClose: import("@arcgis/lumina").TargetedEvent<this, void>;
  /** Fires when the component's content area is collapsed. */
  readonly calcitePanelCollapse: import("@arcgis/lumina").TargetedEvent<this, void>;
  /** Fires when the component's content area is expanded. */
  readonly calcitePanelExpand: import("@arcgis/lumina").TargetedEvent<this, void>;
  /** Fires when the content is scrolled. */
  readonly calcitePanelScroll: import("@arcgis/lumina").TargetedEvent<this, void>;
  /** Fires when the collapse button is clicked. */
  readonly calcitePanelToggle: import("@arcgis/lumina").TargetedEvent<this, void>;
  readonly "@eventTypes": {
    calcitePanelClose: Panel["calcitePanelClose"]["detail"];
    calcitePanelCollapse: Panel["calcitePanelCollapse"]["detail"];
    calcitePanelExpand: Panel["calcitePanelExpand"]["detail"];
    calcitePanelScroll: Panel["calcitePanelScroll"]["detail"];
    calcitePanelToggle: Panel["calcitePanelToggle"]["detail"];
  };
}