import { useViewportType } from '../../useViewportType';
export const useLogic = ({ actions, onClose }) => {
    const { isMobile } = useViewportType();
    const { cancel } = actions;
    const isShowCancelButton = Boolean(cancel);
    const cancelVariant = isMobile ? 'light' : 'text';
    const handleCancelClick = cancel?.onClick || onClose;
    const { variant = cancelVariant } = cancel || {};
    const cancelButtonProps = {
        variant,
        onClick: handleCancelClick,
    };
    return { isShowCancelButton, cancelButtonProps };
};
