import { AriaAttributes, ComputedRef } from 'vue'; import { VueNode } from '@v-c/util/dist/type'; export type ClosableConfig = { closeIcon?: VueNode; disabled?: boolean; onClose?: VoidFunction; } & AriaAttributes & Record<`data-${string}`, unknown>; export type ClosableType = boolean | ClosableConfig | null | undefined; export interface ParsedClosableConfig extends ClosableConfig { closeIcon: VueNode; disabled: boolean; } /** * Normalizes the closable option into a boolean flag, parsed config, and * aria props for the close button. Mirrors rc-notification@2.0 useClosable. */ export default function useClosable(closable: ComputedRef): [ComputedRef, ComputedRef, ComputedRef>];