import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import { Button } from './Button.js';
import './header.css';
export const Header = ({ user, onLogin, onLogout, onCreateAccount })=>/*#__PURE__*/ _jsx("header", {
        children: /*#__PURE__*/ _jsxs("div", {
            className: "storybook-header",
            children: [
                /*#__PURE__*/ _jsxs("div", {
                    children: [
                        /*#__PURE__*/ _jsx("svg", {
                            width: "32",
                            height: "32",
                            viewBox: "0 0 32 32",
                            xmlns: "http://www.w3.org/2000/svg",
                            children: /*#__PURE__*/ _jsxs("g", {
                                fill: "none",
                                fillRule: "evenodd",
                                children: [
                                    /*#__PURE__*/ _jsx("path", {
                                        d: "M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z",
                                        fill: "#FFF"
                                    }),
                                    /*#__PURE__*/ _jsx("path", {
                                        d: "M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z",
                                        fill: "#555AB9"
                                    }),
                                    /*#__PURE__*/ _jsx("path", {
                                        d: "M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z",
                                        fill: "#91BAF8"
                                    })
                                ]
                            })
                        }),
                        /*#__PURE__*/ _jsx("h1", {
                            children: "Acme"
                        })
                    ]
                }),
                /*#__PURE__*/ _jsx("div", {
                    children: user ? /*#__PURE__*/ _jsxs(_Fragment, {
                        children: [
                            /*#__PURE__*/ _jsxs("span", {
                                className: "welcome",
                                children: [
                                    "Welcome, ",
                                    /*#__PURE__*/ _jsx("b", {
                                        children: user.name
                                    }),
                                    "!"
                                ]
                            }),
                            /*#__PURE__*/ _jsx(Button, {
                                size: "small",
                                onClick: onLogout,
                                label: "Log out"
                            })
                        ]
                    }) : /*#__PURE__*/ _jsxs(_Fragment, {
                        children: [
                            /*#__PURE__*/ _jsx(Button, {
                                size: "small",
                                onClick: onLogin,
                                label: "Log in"
                            }),
                            /*#__PURE__*/ _jsx(Button, {
                                primary: true,
                                size: "small",
                                onClick: onCreateAccount,
                                label: "Sign up"
                            })
                        ]
                    })
                })
            ]
        })
    });

//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9uaXRyb2c3L0RldmVsb3BtZW50L2dvdGhhbWpzL3NyYy9zdG9yaWVzL0hlYWRlci50c3giXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtCdXR0b259IGZyb20gJy4vQnV0dG9uLmpzJztcbmltcG9ydCAnLi9oZWFkZXIuY3NzJztcblxudHlwZSBVc2VyID0ge1xuICBuYW1lOiBzdHJpbmc7XG59O1xuXG5pbnRlcmZhY2UgSGVhZGVyUHJvcHMge1xuICB1c2VyPzogVXNlcjtcbiAgb25Mb2dpbjogKCkgPT4gdm9pZDtcbiAgb25Mb2dvdXQ6ICgpID0+IHZvaWQ7XG4gIG9uQ3JlYXRlQWNjb3VudDogKCkgPT4gdm9pZDtcbn1cblxuZXhwb3J0IGNvbnN0IEhlYWRlciA9ICh7dXNlciwgb25Mb2dpbiwgb25Mb2dvdXQsIG9uQ3JlYXRlQWNjb3VudH06IEhlYWRlclByb3BzKSA9PiAoXG4gIDxoZWFkZXI+XG4gICAgPGRpdiBjbGFzc05hbWU9XCJzdG9yeWJvb2staGVhZGVyXCI+XG4gICAgICA8ZGl2PlxuICAgICAgICA8c3ZnIHdpZHRoPVwiMzJcIiBoZWlnaHQ9XCIzMlwiIHZpZXdCb3g9XCIwIDAgMzIgMzJcIiB4bWxucz1cImh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnXCI+XG4gICAgICAgICAgPGcgZmlsbD1cIm5vbmVcIiBmaWxsUnVsZT1cImV2ZW5vZGRcIj5cbiAgICAgICAgICAgIDxwYXRoXG4gICAgICAgICAgICAgIGQ9XCJNMTAgMGgxMmExMCAxMCAwIDAxMTAgMTB2MTJhMTAgMTAgMCAwMS0xMCAxMEgxMEExMCAxMCAwIDAxMCAyMlYxMEExMCAxMCAwIDAxMTAgMHpcIlxuICAgICAgICAgICAgICBmaWxsPVwiI0ZGRlwiXG4gICAgICAgICAgICAvPlxuICAgICAgICAgICAgPHBhdGhcbiAgICAgICAgICAgICAgZD1cIk01LjMgMTAuNmwxMC40IDZ2MTEuMWwtMTAuNC02di0xMXptMTEuNC02LjJsOS43IDUuNS05LjcgNS42VjQuNHpcIlxuICAgICAgICAgICAgICBmaWxsPVwiIzU1NUFCOVwiXG4gICAgICAgICAgICAvPlxuICAgICAgICAgICAgPHBhdGhcbiAgICAgICAgICAgICAgZD1cIk0yNy4yIDEwLjZ2MTEuMmwtMTAuNSA2VjE2LjVsMTAuNS02ek0xNS43IDQuNHYxMUw2IDEwbDkuNy01LjV6XCJcbiAgICAgICAgICAgICAgZmlsbD1cIiM5MUJBRjhcIlxuICAgICAgICAgICAgLz5cbiAgICAgICAgICA8L2c+XG4gICAgICAgIDwvc3ZnPlxuICAgICAgICA8aDE+QWNtZTwvaDE+XG4gICAgICA8L2Rpdj5cbiAgICAgIDxkaXY+XG4gICAgICAgIHt1c2VyID8gKFxuICAgICAgICAgIDw+XG4gICAgICAgICAgICA8c3BhbiBjbGFzc05hbWU9XCJ3ZWxjb21lXCI+XG4gICAgICAgICAgICAgIFdlbGNvbWUsIDxiPnt1c2VyLm5hbWV9PC9iPiFcbiAgICAgICAgICAgIDwvc3Bhbj5cbiAgICAgICAgICAgIDxCdXR0b24gc2l6ZT1cInNtYWxsXCIgb25DbGljaz17b25Mb2dvdXR9IGxhYmVsPVwiTG9nIG91dFwiIC8+XG4gICAgICAgICAgPC8+XG4gICAgICAgICkgOiAoXG4gICAgICAgICAgPD5cbiAgICAgICAgICAgIDxCdXR0b24gc2l6ZT1cInNtYWxsXCIgb25DbGljaz17b25Mb2dpbn0gbGFiZWw9XCJMb2cgaW5cIiAvPlxuICAgICAgICAgICAgPEJ1dHRvbiBwcmltYXJ5IHNpemU9XCJzbWFsbFwiIG9uQ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