define(["require", "exports", "react", "@fluentui/react"], function (require, exports, React, react_1) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.HoverCardInstantDismissExample = void 0;
    var classNames = react_1.mergeStyleSets({
        plainCard: {
            width: 200,
            height: 200,
            display: 'flex',
            alignItems: 'center',
            justifyContent: 'center',
        },
        target: {
            fontWeight: '600',
            display: 'inline-block',
            border: '1px dashed #605e5c',
            padding: 5,
            borderRadius: 2,
        },
    });
    var onCardHide = function () {
        console.log('I am now hidden');
    };
    var HoverCardInstantDismissExample = function () {
        var hoverCard = React.useRef(null);
        var instantDismissCard = function () {
            if (hoverCard.current) {
                hoverCard.current.dismiss();
            }
        };
        var onRenderPlainCard = function () {
            return (React.createElement("div", { className: classNames.plainCard },
                React.createElement(react_1.DefaultButton
                // eslint-disable-next-line react/jsx-no-bind
                , { 
                    // eslint-disable-next-line react/jsx-no-bind
                    onClick: instantDismissCard, text: "Instant Dismiss" })));
        };
        var plainCardProps = {
            onRenderPlainCard: onRenderPlainCard,
        };
        return (React.createElement(react_1.ThemeProvider, null,
            React.createElement("p", null,
                "In cases where an instant dismiss of the card is needed, public method",
                React.createElement("i", null, "dismiss()"),
                " can be used through its ",
                React.createElement("i", null, "componentRef"),
                " prop."),
            React.createElement(react_1.HoverCard, { cardDismissDelay: 2000, type: react_1.HoverCardType.plain, plainCardProps: plainCardProps, componentRef: hoverCard, onCardHide: onCardHide },
                React.createElement("span", { className: classNames.target }, "Hover Over Me"))));
    };
    exports.HoverCardInstantDismissExample = HoverCardInstantDismissExample;
});
//# sourceMappingURL=HoverCard.InstantDismiss.Example.js.map