import React from 'react';
import { classes } from './NavigationToast.st.css.js';
import Toast from '../Toast';
import TextButton from '../TextButton';
import { ArrowBentUpLeft } from '@wix/wix-ui-icons-common';
import { useToastTimeout } from '../StatusToast/hooks/useToastTimeout';
import { dataHooks } from './NavigationToast.constants';
import { useIcons } from '../WixDesignSystemIconThemeProvider';
const NavigationToast = ({ children, dataHook, prefixIcon, onAction, duration = 0, dismissible = true, ...rest }) => {
    const icons = useIcons('NavigationToast', {
        ArrowBentUpLeft,
    });
    const defaultPrefixIcon = React.createElement(icons.ArrowBentUpLeft, null);
    useToastTimeout(duration || undefined, rest.onDismiss);
    return (React.createElement(Toast, { dataHook: dataHook, className: classes.toast, dismissible: dismissible, ...rest },
        React.createElement("div", { onClick: onAction, className: classes.root, "data-hook": dataHooks.actionContainer },
            React.createElement(TextButton, { className: classes.actionButton, skin: "light", size: "medium", weight: "normal", underline: "onHover", prefixIcon: prefixIcon === undefined
                    ? defaultPrefixIcon
                    : prefixIcon || undefined, dataHook: dataHooks.text }, children))));
};
NavigationToast.displayName = 'NavigationToast';
export default NavigationToast;
//# sourceMappingURL=NavigationToast.js.map