"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HorizontalStackShrinkExample = void 0;
var React = require("react");
var react_1 = require("@fluentui/react");
// Non-mutating styles definition
var stackItemStyles = {
    root: {
        alignItems: 'center',
        background: react_1.DefaultPalette.themePrimary,
        color: react_1.DefaultPalette.white,
        display: 'flex',
        height: 50,
        justifyContent: 'center',
        overflow: 'hidden',
    },
};
var nonShrinkingStackItemStyles = {
    root: {
        alignItems: 'center',
        background: react_1.DefaultPalette.themePrimary,
        color: react_1.DefaultPalette.white,
        display: 'flex',
        height: 50,
        justifyContent: 'center',
        overflow: 'hidden',
        width: 500,
    },
};
// Tokens definition
var outerStackTokens = { childrenGap: 5 };
var innerStackTokens = {
    childrenGap: 5,
    padding: 10,
};
var HorizontalStackShrinkExample = function () {
    var _a = React.useState(100), stackWidth = _a[0], setStackWidth = _a[1];
    // Mutating styles definition
    var stackStyles = {
        root: {
            background: react_1.DefaultPalette.themeTertiary,
            overflow: 'hidden',
            width: stackWidth + "%",
        },
    };
    return (React.createElement(react_1.Stack, { tokens: outerStackTokens },
        React.createElement(react_1.Slider, { label: "Change the stack width to see how child items shrink:", min: 1, max: 100, step: 1, defaultValue: 100, showValue: true, onChange: setStackWidth }),
        React.createElement(react_1.Stack, { horizontal: true, styles: stackStyles, tokens: innerStackTokens },
            React.createElement(react_1.Stack.Item, { grow: true, styles: stackItemStyles }, "I shrink"),
            React.createElement(react_1.Stack.Item, { grow: true, styles: stackItemStyles }, "I shrink"),
            React.createElement(react_1.Stack.Item, { grow: true, disableShrink: true, styles: nonShrinkingStackItemStyles }, "I don't shrink"),
            React.createElement(react_1.Stack.Item, { grow: true, styles: stackItemStyles }, "I shrink"))));
};
exports.HorizontalStackShrinkExample = HorizontalStackShrinkExample;
//# sourceMappingURL=Stack.Horizontal.Shrink.Example.js.map