import { differenceInBusinessDays } from "date-fns"; import { ComponentChildren, h, VNode } from "preact"; import { useLayoutEffect, useRef } from "preact/hooks"; import { AsyncButton } from "../../components/AsyncButton"; export interface ConfirmModelProps { active?: boolean; description?: string; onCancel?: () => void; onConfirm?: () => Promise; label?: string; cancelLabel?: string; children?: ComponentChildren; danger?: boolean; disabled?: boolean; } export function ConfirmModal({ active, description, onCancel, onConfirm, children, danger, disabled, label = "Confirm", cancelLabel = "Dismiss", }: ConfirmModelProps): VNode { return (
); }