{"version":3,"file":"dialog-types.mjs","names":[],"sources":["../../../src/dialog/dialog-types.ts"],"sourcesContent":["/*!\n *\n *  Copyright (c) \"Neo4j\"\n *  Neo4j Sweden AB [http://neo4j.com]\n *\n *  This file is part of Neo4j.\n *\n *  Neo4j is free software: you can redistribute it and/or modify\n *  it under the terms of the GNU General Public License as published by\n *  the Free Software Foundation, either version 3 of the License, or\n *  (at your option) any later version.\n *\n *  This program is distributed in the hope that it will be useful,\n *  but WITHOUT ANY WARRANTY; without even the implied warranty of\n *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n *  GNU General Public License for more details.\n *\n *  You should have received a copy of the GNU General Public License\n *  along with this program.  If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport type { ModalProps } from '../modal';\n\nexport interface DialogBaseProps {\n  /** The content to display within the dialog component. */\n  children?: React.ReactNode;\n}\n\n// Should extend ModalCloseReason\nexport enum DialogCloseReason {\n  ESCAPE_KEY_DOWN = 'escapeKeyDown',\n  CLOSE_BUTTON_CLICK = 'closeButtonClick',\n}\n\nexport interface DialogProps extends Omit<ModalProps, 'onClose'> {\n  /** Controls whether the dialog is open or closed. */\n  isOpen: boolean;\n  /** Type of dialog, which determines the icon and styling. */\n  variant?: 'info' | 'warning' | 'danger';\n  /** Whether to disable the close button in the top-right corner. */\n  hasDisabledCloseButton?: boolean;\n  /** Callback function called when the dialog is closed. */\n  onClose?: (\n    event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>,\n    reason?: DialogCloseReason,\n  ) => void;\n}\n\nexport interface DialogContextType {\n  descriptionId?: string;\n  headerId?: string;\n  setDescriptionId?: (id: string) => void;\n  setHeaderId?: (id: string) => void;\n  variant?: DialogProps['variant'];\n}\n\nexport type DialogActionsProps = DialogBaseProps;\n\nexport type DialogHeaderProps = DialogBaseProps;\n\nexport type DialogSubtitleProps = DialogBaseProps;\n\nexport type DialogDescriptionProps = DialogBaseProps;\n\nexport type DialogContentProps = DialogBaseProps;\n\nexport type DialogImageProps = {\n  /** Source URL of the image */\n  src: string;\n  /** Alternative text for the image */\n  alt: string;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA6BA,IAAY,oBAAL,yBAAA,mBAAA;CACL,kBAAA,qBAAA;CACA,kBAAA,wBAAA;;AACF,EAAA,CAAA,CAAA"}