// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
import { ReactionButton } from "../../../../../../react-components/src";
import React, { useMemo } from 'react';
import { usePropsFor } from '../../hooks/usePropsFor';
import { concatButtonBaseStyles } from '../../styles/Buttons.styles';
/** @private */
export const Reaction = (props) => {
    const reactionButtonProps = usePropsFor(ReactionButton);
    const styles = useMemo(() => { var _a; return concatButtonBaseStyles((_a = props.styles) !== null && _a !== void 0 ? _a : {}); }, [props.styles]);
    const reactionButtonDisabled = isDisabled(props.option) || reactionButtonProps.disabled;
    return React.createElement(ReactionButton, Object.assign({ "data-ui-id": "call-composite-reaction-button" }, reactionButtonProps, { showLabel: props.displayType !== 'compact', disabled: reactionButtonDisabled || props.disabled, styles: styles, disableTooltip: props.disableTooltip, persistMenu: true, reactionResources: props.reactionResource }));
};
const isDisabled = (option) => {
    if (option === undefined || option === true || option === false) {
        return false;
    }
    return option.disabled;
};
//# sourceMappingURL=Reaction.js.map