import { Dialog } from '@/shared/ui/dialogs/dialog';
import { overlay } from 'overlay-kit';

export const showAlert = (msg: string) => {
  overlay.open(({
    isOpen,
    close,
    unmount
  }) => {
    return (
      <Dialog
        afterLeave={ unmount }
        open={ isOpen }
        onClose={ close }
        message={ msg }
        buttonLabel={ ['확인'] }
      />
    );
  });
};