"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
var __importStar = (this && this.__importStar) || function (mod) {
    if (mod && mod.__esModule) return mod;
    var result = {};
    if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
    result["default"] = mod;
    return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
const addon_centered_1 = __importDefault(require("@storybook/addon-centered"));
const addon_info_1 = require("@storybook/addon-info");
const addon_knobs_1 = require("@storybook/addon-knobs");
const addon_notes_1 = require("@storybook/addon-notes");
const react_1 = require("@storybook/react");
const React = __importStar(require("react"));
const index_1 = require("./index");
const addon_actions_1 = require("@storybook/addon-actions");
const Modal_1 = require("../Modal");
const renderSelectInput = (error) => {
    return (React.createElement(index_1.SelectInput, { options: [
            { value: '0', label: 'Guillaume Arm', picture: 'https://dgivdslhqe3qo.cloudfront.net/careers/members/15768/thumb_avatar_1558702997.png' },
            { value: '1', label: 'Hugo Mano', picture: 'https://dgivdslhqe3qo.cloudfront.net/careers/members/15767/thumb_avatar_1558702986.png' },
            { value: '2', label: 'Maud Miguet', picture: 'https://dgivdslhqe3qo.cloudfront.net/careers/members/15764/thumb_avatar_1558702913.png' },
            { value: '3', label: 'Alexandre Lachèze', picture: 'https://dgivdslhqe3qo.cloudfront.net/careers/members/15763/thumb_avatar_1558702855.png' },
            { value: '4', label: 'Mikaël Atier' },
            { value: '5', label: 'Julien Berthomier', picture: 'https://dgivdslhqe3qo.cloudfront.net/careers/members/15766/thumb_avatar_1558702979.png' },
            { value: '6', label: 'Joël Charles', picture: 'https://dgivdslhqe3qo.cloudfront.net/careers/members/12181/thumb_avatar_1558702850.png' },
            { value: '7', label: 'Mathias D', picture: 'https://dgivdslhqe3qo.cloudfront.net/careers/members/17076/thumb_avatar_1567069484.jpg' },
        ], value: null, label: 'Select', onChange: addon_actions_1.action('onChange'), placeholder: "Search members from your organization", noOptionsMessage: "No one found.", error: error }));
};
react_1.storiesOf('Molecules|SelectInput', module)
    .addDecorator(addon_knobs_1.withKnobs)
    .addDecorator(addon_centered_1.default)
    .add('Select Input', addon_info_1.withInfo({ text: 'Select Input' })(addon_notes_1.withNotes('Select Input - Base')(() => (renderSelectInput()))))
    .add('Select Input in a Modal', () => (React.createElement(Modal_1.Modal, { title: addon_knobs_1.text('Title', 'My modal'), onCancel: addon_actions_1.action('cancel'), onContinue: addon_actions_1.action('continue') },
    React.createElement("div", null,
        React.createElement("p", null, addon_knobs_1.text('Content', 'Content of the modal with a SelectInput.')),
        renderSelectInput()))))
    .add('Select Input with error', () => (renderSelectInput('Field required')));
//# sourceMappingURL=stories.js.map