"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var react_1 = require("react");
var spinner_1 = require("react-icons/lib/fa/spinner");
var react_2 = require("@storybook/react");
var addon_actions_1 = require("@storybook/addon-actions");
var storybook_chrome_screenshot_1 = require("storybook-chrome-screenshot");
var with_readme_1 = require("storybook-readme/with-readme");
var __1 = require("..");
var Tooltips_md_1 = require("./README/Tooltips.md");
react_2.storiesOf('Core/Tooltips', module)
    .addDecorator(with_readme_1.default(Tooltips_md_1.default))
    .addDecorator(storybook_chrome_screenshot_1.withScreenshot())
    .add('Standard', function () {
    return (react_1.default.createElement(__1.Provider, null,
        react_1.default.createElement(__1.Box, { m: 3 },
            react_1.default.createElement(__1.Button, { tooltip: 'Tooltip on top', m: 2, primary: true, onClick: addon_actions_1.action('case-1') }, "Tooltip on top"),
            react_1.default.createElement(__1.Button, { tooltip: { text: 'Tooltip on right', placement: 'right' }, m: 2, secondary: true, onClick: addon_actions_1.action('case-2') }, "Tooltip on right"),
            react_1.default.createElement(__1.Button, { tooltip: { text: 'Tooltip on bottom', placement: 'bottom' }, m: 2, success: true, onClick: addon_actions_1.action('case-3') }, "Tooltip on bottom"),
            react_1.default.createElement(__1.Button, { tooltip: { text: 'Tooltip on left', placement: 'left' }, m: 2, tertiary: true, onClick: addon_actions_1.action('case-4') }, "Tooltip on left"),
            react_1.default.createElement(__1.Button, { tooltip: 'Tooltip on disabled button', m: 2, onClick: addon_actions_1.action('case-5'), disabled: true }, "Tooltip on disabled button"))));
})
    .add('Click', function () {
    return (react_1.default.createElement(__1.Provider, null,
        react_1.default.createElement(__1.Box, { m: 3 },
            react_1.default.createElement(__1.Button, { tooltip: { text: 'Tooltip on top', trigger: 'click' }, m: 2, primary: true, onClick: addon_actions_1.action('case-1') }, "Tooltip on top"),
            react_1.default.createElement(__1.Button, { tooltip: {
                    text: 'Tooltip on right',
                    trigger: 'click',
                    placement: 'right'
                }, m: 2, secondary: true, onClick: addon_actions_1.action('case-2') }, "Tooltip on right"),
            react_1.default.createElement(__1.Button, { tooltip: {
                    text: 'Tooltip on bottom',
                    trigger: 'click',
                    placement: 'bottom'
                }, m: 2, success: true, onClick: addon_actions_1.action('case-3') }, "Tooltip on bottom"),
            react_1.default.createElement(__1.Button, { tooltip: {
                    text: 'Tooltip on left',
                    trigger: 'click',
                    placement: 'left'
                }, m: 2, tertiary: true, onClick: addon_actions_1.action('case-4') }, "Tooltip on left"))));
})
    .add('Supported Elements', function () {
    return (react_1.default.createElement(__1.Provider, null,
        react_1.default.createElement(__1.Box, { m: 3 },
            react_1.default.createElement(__1.Heading.h3, null, "Alert"),
            react_1.default.createElement(__1.Alert, { tooltip: 'Alert tooltip', warning: true }, "Lorem ipsum dolor sit amet."),
            react_1.default.createElement(__1.Heading.h3, { mt: 30 }, "Badge"),
            react_1.default.createElement(__1.Badge, { tooltip: 'Badge tooltip', text: 'lorem' }),
            react_1.default.createElement(__1.Heading.h3, { mt: 30 }, "BadgeSelect"),
            react_1.default.createElement(__1.BadgeSelect, { tooltip: 'BadgeSelect tooltip', items: ['wpe', 'web', 'redis'] }),
            react_1.default.createElement(__1.Heading.h3, { mt: 30 }, "Box"),
            react_1.default.createElement(__1.Box, { tooltip: 'Box tooltip' }, "Lorem ipsum dolor sit amet."),
            react_1.default.createElement(__1.Heading.h3, { mt: 30 }, "Button"),
            react_1.default.createElement(__1.Button, { tooltip: 'Button tooltip', mr: 2, mb: 2 }, "Lorem ipsum"),
            react_1.default.createElement(__1.Button, { tooltip: 'Button tooltip', iconElement: react_1.default.createElement(spinner_1.default, null), mr: 2, mb: 2 }, "Lorem ipsum"),
            react_1.default.createElement(__1.Button, { tooltip: 'Button tooltip', mr: 2, mb: 2, disabled: true }, "Lorem ipsum"),
            react_1.default.createElement(__1.Button, { tooltip: 'Button tooltip', iconElement: react_1.default.createElement(spinner_1.default, null), mr: 2, mb: 2, disabled: true },
                react_1.default.createElement(__1.Txt, null, "Lorem ipsum")),
            react_1.default.createElement(__1.Heading.h3, { mt: 30 }, "CodeWithCopy"),
            react_1.default.createElement(__1.CodeWithCopy, { text: 'Lorem', tooltip: 'CodeWithCopy tooltip' }),
            react_1.default.createElement(__1.Heading.h3, { mt: 30 }, "DropDownButton"),
            react_1.default.createElement(__1.DropDownButton, { tooltip: 'DropDownButton tooltip', mx: 2, primary: true, label: react_1.default.createElement("div", null, "DropDown") },
                react_1.default.createElement("div", null, "Item"),
                react_1.default.createElement("div", null, "Item"),
                react_1.default.createElement("div", null, "Item"),
                react_1.default.createElement("div", null, "Item")),
            react_1.default.createElement(__1.Fixed, { right: '30px', tooltip: 'Fixed tooltip' },
                react_1.default.createElement(__1.Heading.h3, { mt: 30 }, "Fixed")),
            react_1.default.createElement(__1.Heading.h3, { mt: 30 }, "Flex"),
            react_1.default.createElement(__1.Flex, { style: { height: 30 }, bg: 'red', tooltip: 'Flex tooltip' }),
            react_1.default.createElement(__1.Heading.h3, { mt: 30 }, "Heading"),
            react_1.default.createElement(__1.Heading.h2, { tooltip: 'Heading tooltip' }, "Hello world!"),
            react_1.default.createElement(__1.Heading.h3, { mt: 30 }, "Link"),
            react_1.default.createElement(__1.Link, { tooltip: 'Link tooltip' }, "Lorem ipsum dolor sit amet"),
            react_1.default.createElement(__1.Heading.h3, { mt: 30 }, "Txt"),
            react_1.default.createElement(__1.Txt, { tooltip: 'Txt tooltip' }, "Lorem ipsum dolor sit amet"))));
})
    .add('Styled tooltips', function () {
    return (react_1.default.createElement(__1.Provider, null,
        react_1.default.createElement(__1.Box, { m: 3 },
            react_1.default.createElement(__1.Button, { tooltip: {
                    text: 'Lorem ipsum dolor sit amet',
                    containerStyle: {
                        color: 'pink',
                        fontStyle: 'italic'
                    }
                }, m: 2, primary: true, onClick: addon_actions_1.action('case-1') }, "Styled tooltip container"),
            react_1.default.createElement(__1.Button, { tooltip: {
                    text: 'Lorem ipsum dolor sit amet',
                    arrowStyle: {
                        marginLeft: -70,
                        borderTopWidth: 10
                    }
                }, m: 2, primary: true, onClick: addon_actions_1.action('case-1') }, "Styled tooltip arrow"),
            react_1.default.createElement(__1.Button, { tooltip: {
                    text: 'Lorem ipsum dolor sit amet',
                    innerStyle: {
                        borderRadius: 15
                    }
                }, m: 2, primary: true, onClick: addon_actions_1.action('case-1') }, "Styled tooltip inner"))));
});
