import { __assign } from "tslib";
import * as React from 'react';
import { Dropdown } from '@fluentui/react/lib/Dropdown';
import { Slider } from '@fluentui/react/lib/Slider';
import { Stack } from '@fluentui/react/lib/Stack';
import { DefaultPalette } from '@fluentui/react/lib/Styling';
// Non-mutating styles definition
var itemStyles = {
    alignItems: 'center',
    background: DefaultPalette.themePrimary,
    color: DefaultPalette.white,
    display: 'flex',
    height: 50,
    justifyContent: 'center',
    width: 50,
};
var VerticalStackWrapAdvancedExampleContent = function (props) {
    var stackWidth = props.stackWidth, containerHeight = props.containerHeight, overflow = props.overflow, horizontalAlignment = props.horizontalAlignment, verticalAlignment = props.verticalAlignment;
    // Mutating styles definition
    var stackStyles = {
        root: {
            background: DefaultPalette.themeTertiary,
            overflow: overflow,
            width: stackWidth + "%",
        },
    };
    var containerStyles = { height: containerHeight };
    return (React.createElement("div", { style: containerStyles },
        React.createElement(Stack, { wrap: true, horizontalAlign: horizontalAlignment, verticalAlign: verticalAlignment, styles: stackStyles, tokens: wrapStackTokens },
            React.createElement("span", { style: itemStyles }, "1"),
            React.createElement("span", { style: itemStyles }, "2"),
            React.createElement("span", { style: itemStyles }, "3"),
            React.createElement("span", { style: itemStyles }, "4"),
            React.createElement("span", { style: itemStyles }, "5"))));
};
// Tokens definition
var sectionStackTokens = { childrenGap: 10 };
var wrapStackTokens = { childrenGap: 20 };
// Alignment options
var horizontalAlignmentOptions = [
    { key: 'start', text: 'Left' },
    { key: 'center', text: 'Center' },
    { key: 'end', text: 'Right' },
];
var verticalAlignmentOptions = [
    { key: 'start', text: 'Top' },
    { key: 'center', text: 'Center' },
    { key: 'end', text: 'Bottom' },
    { key: 'space-around', text: 'Space around' },
    { key: 'space-between', text: 'Space between' },
    { key: 'space-evenly', text: 'Space evenly' },
];
var overflowOptions = [
    { key: 'visible', text: 'Visible' },
    { key: 'auto', text: 'Auto' },
    { key: 'hidden', text: 'Hidden' },
];
export var VerticalStackWrapAdvancedExample = function () {
    var _a = React.useState(100), stackWidth = _a[0], setStackWidth = _a[1];
    var _b = React.useState(420), containerHeight = _b[0], setContainerHeight = _b[1];
    var _c = React.useState('start'), horizontalAlignment = _c[0], setHorizontalAlignment = _c[1];
    var _d = React.useState('start'), verticalAlignment = _d[0], setVerticalAlignment = _d[1];
    var _e = React.useState('visible'), overflow = _e[0], setOverflow = _e[1];
    return (React.createElement(Stack, { tokens: sectionStackTokens },
        React.createElement(Stack, { horizontal: true },
            React.createElement(Stack.Item, { grow: true },
                React.createElement(Slider, { label: "Stack height:", min: 1, max: 420, step: 1, defaultValue: 420, showValue: true, onChange: setContainerHeight })),
            React.createElement(Stack.Item, { grow: true },
                React.createElement(Slider, { label: "Container width:", min: 1, max: 100, step: 1, defaultValue: 100, showValue: true, onChange: setStackWidth }))),
        React.createElement(Stack, { horizontal: true, tokens: wrapStackTokens },
            React.createElement(Stack.Item, { grow: true },
                React.createElement(Dropdown, { selectedKey: horizontalAlignment, placeholder: "Select Horizontal Alignment", label: "Horizontal alignment:", options: horizontalAlignmentOptions, 
                    // eslint-disable-next-line react/jsx-no-bind
                    onChange: function (ev, option) {
                        return setHorizontalAlignment(option.key);
                    } })),
            React.createElement(Stack.Item, { grow: true },
                React.createElement(Dropdown, { selectedKey: verticalAlignment, placeholder: "Select Vertical Alignment", label: "Vertical alignment:", options: verticalAlignmentOptions, 
                    // eslint-disable-next-line react/jsx-no-bind
                    onChange: function (ev, option) {
                        return setVerticalAlignment(option.key);
                    } })),
            React.createElement(Stack.Item, { grow: true },
                React.createElement(Dropdown, { selectedKey: overflow, placeholder: "Select Overflow", label: "Overflow:", options: overflowOptions, 
                    // eslint-disable-next-line react/jsx-no-bind
                    onChange: function (ev, option) {
                        return setOverflow(option.key);
                    } }))),
        React.createElement(VerticalStackWrapAdvancedExampleContent, __assign({}, { stackWidth: stackWidth, containerHeight: containerHeight, horizontalAlignment: horizontalAlignment, verticalAlignment: verticalAlignment, overflow: overflow }))));
};
//# sourceMappingURL=Stack.Vertical.WrapAdvanced.Example.js.map