import type { Key } from '../_util/type'; import { booleanType, someType, stringType, functionType } from '../_util/type'; import PropTypes from '../_util/vue-types'; export type CollapsibleType = 'header' | 'icon' | 'disabled'; export type ActiveKeyType = Array | string | number; export interface PanelProps { isActive?: boolean; header?: any; showArrow?: boolean; forceRender?: boolean; /** @deprecated Use `collapsible="disabled"` instead */ disabled?: boolean; extra?: any; collapsible?: CollapsibleType; } const collapseProps = () => ({ prefixCls: String, activeKey: someType([Array, Number, String]), defaultActiveKey: someType([Array, Number, String]), accordion: booleanType(), destroyInactivePanel: booleanType(), bordered: booleanType(), expandIcon: functionType<(panelProps: PanelProps) => any>(), openAnimation: PropTypes.object, expandIconPosition: stringType<'start' | 'end'>(), collapsible: stringType(), ghost: booleanType(), onChange: functionType<(key: Key | Key[]) => void>(), 'onUpdate:activeKey': functionType<(key: Key | Key[]) => void>(), }); const collapsePanelProps = () => ({ openAnimation: PropTypes.object, prefixCls: String, header: PropTypes.any, headerClass: String, showArrow: booleanType(), isActive: booleanType(), destroyInactivePanel: booleanType(), /** @deprecated Use `collapsible="disabled"` instead */ disabled: booleanType(), accordion: booleanType(), forceRender: booleanType(), expandIcon: functionType<(panelProps: PanelProps) => any>(), extra: PropTypes.any, panelKey: someType(), collapsible: stringType(), role: String, onItemClick: functionType<(panelKey: Key) => void>(), }); export { collapseProps, collapsePanelProps };