import React from 'react';
import { ResourceFormModal } from './modal';

interface CreateModalProps {
  onClose: () => void;
  onSuccess?: () => void;
}

export const CreateModal: React.FC<CreateModalProps> = ({
  onClose,
  onSuccess,
}) => {
  const handleMutationSuccess = () => {
    onSuccess?.();
    onClose?.();
  };

  return (
    <ResourceFormModal
      action="create"
      onCancel={onClose}
      onMutationSuccess={handleMutationSuccess}
    />
  );
};
