import { RenderNodeFn, VueNode as VueNode$1 } from "../type.js";
import * as vue906 from "vue";
import { AriaAttributes, Ref, VNodeChild } from "vue";

//#region src/_util/hooks/useClosable.d.ts
interface DataAttributes {
  [key: `data-${string}`]: string;
}
type ClosableType = boolean | ({
  closeIcon?: VueNode$1;
  disabled?: boolean;
} & AriaAttributes);
interface BaseContextClosable {
  closable?: ClosableType;
  closeIcon?: VueNode$1;
}
type ContextClosable<T extends BaseContextClosable = any> = Partial<Pick<T, 'closable' | 'closeIcon'>>;
declare function pickClosable<T extends BaseContextClosable>(context: Ref<ContextClosable<T>>): Ref<ContextClosable<T> | undefined>;
/** Collection contains the all the props related with closable. e.g. `closable`, `closeIcon` */
interface ClosableCollection {
  closable?: ClosableType;
  closeIcon?: VueNode$1;
}
interface FallbackCloseCollection extends ClosableCollection {
  /**
   * Some components need to wrap CloseIcon twice,
   * this method will be executed once after the final CloseIcon is calculated
   */
  closeIconRender?: (closeIcon: VNodeChild) => VNodeChild;
}
interface UseClosableParams {
  closable?: ClosableType;
  closeIcon?: RenderNodeFn;
  defaultClosable?: boolean;
  defaultCloseIcon?: RenderNodeFn;
  customCloseIconRender?: (closeIcon: VNodeChild) => VNodeChild;
  context?: ContextClosable;
}
declare function useClosable(propCloseCollection?: Ref<ClosableCollection>, contextCloseCollection?: Ref<ClosableCollection | null>, fallbackCloseCollection?: Ref<FallbackCloseCollection>): vue906.ComputedRef<readonly [true, vue906.VNode<vue906.RendererNode, vue906.RendererElement, {
  [key: string]: any;
}>, boolean, Record<string, any>] | ({} | null)[] | undefined>;
declare function computeClosable(propCloseCollection?: Ref<ClosableCollection>, contextCloseCollection?: Ref<ClosableCollection | null>, fallbackCloseCollection?: Ref<FallbackCloseCollection>, closeLabel?: string): [closable: boolean, closeIcon: VueNode$1, closeBtnIsDisabled: boolean, ariaOrDataProps: AriaAttributes & DataAttributes];
//#endregion
export { BaseContextClosable, ClosableType, ContextClosable, UseClosableParams, computeClosable, useClosable as default, pickClosable };