// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { DefaultButton, IconButton, Modal, PrimaryButton, Stack, Text, mergeStyles, concatStyleSets } from '@fluentui/react';
import { useTheme } from "../../../../../react-components/src";
import React from 'react';
/**
 * @private
 */
export const Prompt = (props) => {
    var _a;
    const theme = useTheme();
    const styles = concatStyleSets(modalStyles, (_a = props.styles) !== null && _a !== void 0 ? _a : {});
    return React.createElement(Modal, { styles: styles, isOpen: props.isOpen, onDismiss: props.onDismiss, isBlocking: false },
        React.createElement(Stack, { className: mergeStyles({
                position: 'relative'
            }) },
            React.createElement(Text, { className: mergeStyles({
                    fontWeight: 600,
                    fontSize: '1.25rem'
                }) }, props.heading),
            React.createElement(IconButton, { styles: iconButtonStyles(theme), iconProps: {
                    iconName: 'Cancel'
                }, onClick: props.onCancel, ariaLabel: props.closeButtonLabel })),
        React.createElement(Stack, { verticalAlign: "center", className: mergeStyles({
                minHeight: '6rem'
            }) },
            React.createElement(Text, { className: mergeStyles({
                    fontSize: '0.875rem'
                }) }, props.text)),
        React.createElement(Stack, { horizontal: true, horizontalAlign: "end", tokens: {
                childrenGap: '0.5rem'
            } },
            React.createElement(PrimaryButton, { styles: buttonTextStyles, text: props.confirmButtonLabel, onClick: props.onConfirm }),
            React.createElement(DefaultButton, { styles: buttonTextStyles, text: props.cancelButtonLabel, onClick: props.onCancel })));
};
const iconButtonStyles = (theme) => ({
    root: {
        position: 'absolute',
        top: 0,
        right: 0,
        color: theme.palette.neutralPrimary
    },
    rootHovered: {
        color: theme.palette.neutralDark
    }
});
const modalStyles = {
    main: {
        padding: '1.5rem ',
        maxWidth: '30rem'
    }
};
const buttonTextStyles = {
    label: {
        fontSize: '0.875rem'
    }
};
//# sourceMappingURL=Prompt.js.map