import { withSchema } from '@websolutespa/bom-core';
import { Modal as ModalBase } from './modal';
import { ModalBackdrop } from './modal-backdrop';
import { ModalConfirm } from './modal-confirm';
import { ModalContent } from './modal-content';
import { ModalDialog } from './modal-dialog';
import { ModalDismiss } from './modal-dismiss';
import { ModalFooter } from './modal-footer';
import { ModalHeader } from './modal-header';
import { ModalPortal } from './modal-portal';
import { ModalRoot } from './modal-root';
import { ModalTitle } from './modal-title';
import { ModalTrigger } from './modal-trigger';

export const Modal = withSchema(
  ModalBase,
  {
    Backdrop: ModalBackdrop,
    Confirm: ModalConfirm,
    Content: ModalContent,
    Dialog: ModalDialog,
    Dismiss: ModalDismiss,
    Footer: ModalFooter,
    Header: ModalHeader,
    Portal: ModalPortal,
    Root: ModalRoot,
    Title: ModalTitle,
    Trigger: ModalTrigger,
  }
);

export type { ModalProps } from './modal';
export type { ModalBackdropProps } from './modal-backdrop';
export type { ModalConfirmProps } from './modal-confirm';
export type { ModalContentProps } from './modal-content';
export type { ModalDialogProps } from './modal-dialog';
export type { ModalDismissProps } from './modal-dismiss';
export type { ModalFooterProps } from './modal-footer';
export type { ModalHeaderProps } from './modal-header';
export type { ModalPortalProps } from './modal-portal';
export type { ModalRootProps } from './modal-root';
export type { ModalTitleProps } from './modal-title';
export type { ModalTriggerProps } from './modal-trigger';

export * from './modal.variants';

