import * as tslib_1 from "tslib";
import * as React from 'react';
import { css, classNamesFunction } from '../../../Utilities';
import { getStyles } from './Button.Basic.Example.styles';
import { DefaultButton, IconButton } from 'office-ui-fabric-react/lib/Button';
import { Label } from 'office-ui-fabric-react/lib/Label';
import { getCustomSplitButtonStyles } from './Button.Split.Example.styles';
var alertClicked = function () {
    alert('Clicked');
};
var ButtonSplitExample = /** @class */ (function (_super) {
    tslib_1.__extends(ButtonSplitExample, _super);
    function ButtonSplitExample() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ButtonSplitExample.prototype.render = function () {
        var _a = this.props, disabled = _a.disabled, checked = _a.checked;
        var getClassNames = classNamesFunction();
        var classNames = getClassNames(getStyles);
        return (React.createElement("div", { className: css(classNames.twoup) },
            React.createElement("div", null,
                React.createElement(Label, null, "Standard"),
                React.createElement(DefaultButton, { "data-automation-id": "test", disabled: disabled, checked: checked, text: "Create account", onClick: alertClicked, split: true, splitButtonAriaLabel: 'See 2 sample options', "aria-roledescription": 'split button', style: { height: '35px' }, menuProps: {
                        items: [
                            {
                                key: 'emailMessage',
                                text: 'Email message',
                                iconProps: { iconName: 'Mail' }
                            },
                            {
                                key: 'calendarEvent',
                                text: 'Calendar event',
                                iconProps: { iconName: 'Calendar' }
                            }
                        ]
                    } })),
            React.createElement("div", null,
                React.createElement(Label, null, "Primary"),
                React.createElement(DefaultButton, { primary: true, "data-automation-id": "test", disabled: disabled, checked: checked, text: "Create account", onClick: alertClicked, split: true, "aria-roledescription": 'split button', style: { height: '35px' }, menuProps: {
                        items: [
                            {
                                key: 'emailMessage',
                                text: 'Email message',
                                iconProps: { iconName: 'Mail' }
                            },
                            {
                                key: 'calendarEvent',
                                text: 'Calendar event',
                                iconProps: { iconName: 'Calendar' }
                            }
                        ]
                    } })),
            React.createElement("div", null,
                React.createElement(Label, null, "Primary Action Disabled"),
                React.createElement(DefaultButton, { primary: true, "data-automation-id": "test", disabled: disabled, primaryDisabled: true, checked: checked, text: "Create account", onClick: alertClicked, split: true, "aria-roledescription": 'split button', style: { height: '35px' }, menuProps: {
                        items: [
                            {
                                key: 'emailMessage',
                                text: 'Email message',
                                iconProps: { iconName: 'Mail' }
                            },
                            {
                                key: 'calendarEvent',
                                text: 'Calendar event',
                                iconProps: { iconName: 'Calendar' }
                            }
                        ]
                    } })),
            React.createElement("div", null,
                React.createElement(Label, null, "Button Disabled"),
                React.createElement(DefaultButton, { primary: true, "data-automation-id": "test", disabled: true, allowDisabledFocus: true, checked: checked, text: "Create account", onClick: alertClicked, onKeyPress: alertClicked, onKeyDown: alertClicked, onKeyUp: alertClicked, onMouseDown: alertClicked, onMouseUp: alertClicked, split: true, "aria-roledescription": 'split button', style: { height: '35px' }, menuProps: {
                        items: [
                            {
                                key: 'emailMessage',
                                text: 'Email message',
                                iconProps: { iconName: 'Mail' }
                            },
                            {
                                key: 'calendarEvent',
                                text: 'Calendar event',
                                iconProps: { iconName: 'Calendar' }
                            }
                        ]
                    } }))));
    };
    return ButtonSplitExample;
}(React.Component));
export { ButtonSplitExample };
var ButtonSplitCustomExample = /** @class */ (function (_super) {
    tslib_1.__extends(ButtonSplitCustomExample, _super);
    function ButtonSplitCustomExample() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    ButtonSplitCustomExample.prototype.render = function () {
        var _a = this.props, disabled = _a.disabled, checked = _a.checked;
        var customSplitButtonStyles = getCustomSplitButtonStyles();
        return (React.createElement("div", null,
            React.createElement(Label, null, "Split button with icon and custom styles"),
            React.createElement(IconButton, { "data-automation-id": "test", disabled: disabled, checked: checked, iconProps: { iconName: 'Upload' }, text: "Create account", onClick: alertClicked, split: true, "aria-roledescription": 'split button', styles: customSplitButtonStyles, menuProps: {
                    items: [
                        {
                            key: 'emailMessage',
                            text: 'Email message',
                            iconProps: { iconName: 'Mail' }
                        },
                        {
                            key: 'calendarEvent',
                            text: 'Calendar event',
                            iconProps: { iconName: 'Calendar' }
                        }
                    ]
                } })));
    };
    return ButtonSplitCustomExample;
}(React.Component));
export { ButtonSplitCustomExample };
//# sourceMappingURL=Button.Split.Example.js.map