import { AdminFormDialog, AdminFormSection } from "@/shared/ui/AdminFormDialog.jsx";

export function HostOrgActionModal({
  children,
  disabled,
  loading,
  onClose,
  onSubmit,
  open,
  sectioned = true,
  sectionTitle = "表单信息",
  size = "compact",
  submitLabel = "提交",
  submitVariant = "primary",
  title
}) {
  return (
    <AdminFormDialog
      loading={loading}
      open={open}
      size={size}
      submitDisabled={disabled || loading}
      submitLabel={submitLabel}
      submitVariant={submitVariant}
      title={title}
      onClose={onClose}
      onSubmit={onSubmit}
    >
      {sectioned ? <AdminFormSection title={sectionTitle}>{children}</AdminFormSection> : children}
    </AdminFormDialog>
  );
}
