(function (factory) {
    if (typeof module === "object" && typeof module.exports === "object") {
        var v = factory(require, exports);
        if (v !== undefined) module.exports = v;
    }
    else if (typeof define === "function" && define.amd) {
        define(["require", "exports", "tslib", "styled-components", "../utils/theme/getTheme", "../typography/P2", "../Pallette/themes", "../Pallette/style-utils", "./theme"], factory);
    }
})(function (require, exports) {
    "use strict";
    Object.defineProperty(exports, "__esModule", { value: true });
    exports.Divider = exports.Text = exports.IconWrapper = exports.ItemWrapper = exports.BreadcrumbsWrapper = void 0;
    var tslib_1 = require("tslib");
    var styled_components_1 = (0, tslib_1.__importStar)(require("styled-components"));
    var getTheme_1 = require("../utils/theme/getTheme");
    var P2_1 = (0, tslib_1.__importDefault)(require("../typography/P2"));
    var themes_1 = require("../Pallette/themes");
    var style_utils_1 = require("../Pallette/style-utils");
    var theme_1 = require("./theme");
    var COMPONENT_NAME = "breadcrumbs";
    exports.BreadcrumbsWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = (0, tslib_1.__makeTemplateObject)(["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  width: 100%;\n  height: 32px;\n  gap: 8px;\n\n  & > div:last-child {\n    min-width: 0;\n    width: ", ";\n  }\n\n  ", "\n"], ["\n  display: flex;\n  flex-direction: row;\n  align-items: center;\n  width: 100%;\n  height: 32px;\n  gap: 8px;\n\n  & > div:last-child {\n    min-width: 0;\n    width: ", ";\n  }\n\n  ", "\n"])), function (_a) {
        var widthLastNodeElement = _a.widthLastNodeElement;
        return typeof widthLastNodeElement === "string"
            ? widthLastNodeElement
            : widthLastNodeElement + "px";
    }, function (_a) {
        var isLastChildEllipsis = _a.isLastChildEllipsis;
        return isLastChildEllipsis
            ? (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = (0, tslib_1.__makeTemplateObject)(["\n          & > div:last-child span {\n            overflow: hidden;\n            text-overflow: ellipsis;\n            white-space: nowrap;\n          }\n        "], ["\n          & > div:last-child span {\n            overflow: hidden;\n            text-overflow: ellipsis;\n            white-space: nowrap;\n          }\n        "]))) : null;
    });
    exports.ItemWrapper = styled_components_1.default.div.attrs(function (props) { return ({
        theme: (0, getTheme_1.getTheme)({
            componentName: COMPONENT_NAME,
            theme: props.theme,
            defaultTheme: theme_1.defaultThemeBreadcrumbs
        })
    }); })(templateObject_6 || (templateObject_6 = (0, tslib_1.__makeTemplateObject)(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  height: 32px;\n  cursor: pointer;\n\n  ", ";\n"], ["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  height: 32px;\n  cursor: pointer;\n\n  ", ";\n"])), function (_a) {
        var viewType = _a.viewType, theme = _a.theme, isDisabled = _a.isDisabled;
        if (isDisabled) {
            return (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = (0, tslib_1.__makeTemplateObject)(["\n        color: ", ";\n        cursor: not-allowed;\n      "], ["\n        color: ", ";\n        cursor: not-allowed;\n      "])), theme.components.breadcrumbs.colorDisabled);
        }
        else if (viewType === "current") {
            return (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = (0, tslib_1.__makeTemplateObject)(["\n        color: ", ";\n        cursor: default;\n      "], ["\n        color: ", ";\n        cursor: default;\n      "])), theme.components.breadcrumbs.colorActive);
        }
        else {
            return (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = (0, tslib_1.__makeTemplateObject)(["\n        color: ", ";\n        &:hover {\n          color: ", ";\n        }\n      "], ["\n        color: ", ";\n        &:hover {\n          color: ", ";\n        }\n      "])), theme.components.breadcrumbs.colorDefault, theme.components.breadcrumbs.colorHover);
        }
    });
    exports.ItemWrapper.defaultProps = {
        theme: themes_1.LIGHT_THEME
    };
    exports.IconWrapper = styled_components_1.default.div(templateObject_7 || (templateObject_7 = (0, tslib_1.__makeTemplateObject)(["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  width: 24px;\n  height: 24px;\n  min-width: 24px;\n  min-height: 24px;\n  margin: 0 4px;\n\n  & > span {\n    color: unset;\n  }\n"], ["\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  width: 24px;\n  height: 24px;\n  min-width: 24px;\n  min-height: 24px;\n  margin: 0 4px;\n\n  & > span {\n    color: unset;\n  }\n"])));
    exports.Text = (0, styled_components_1.default)(P2_1.default)(templateObject_8 || (templateObject_8 = (0, tslib_1.__makeTemplateObject)(["\n  ", "\n  white-space: nowrap;\n"], ["\n  ", "\n  white-space: nowrap;\n"])), style_utils_1.Margin.allSide(0, 1));
    exports.Divider = (0, styled_components_1.default)(P2_1.default).attrs(function (props) { return ({
        theme: (0, getTheme_1.getTheme)({
            componentName: COMPONENT_NAME,
            theme: props.theme,
            defaultTheme: theme_1.defaultThemeBreadcrumbs
        })
    }); })(templateObject_9 || (templateObject_9 = (0, tslib_1.__makeTemplateObject)(["\n  ", "\n  color: ", ";\n  width: 8px;\n  min-width: 8px;\n"], ["\n  ", "\n  color: ", ";\n  width: 8px;\n  min-width: 8px;\n"])), style_utils_1.Margin.allSide(0, 2), function (_a) {
        var theme = _a.theme;
        return theme.components.breadcrumbs.dividerColor;
    });
    exports.Divider.defaultProps = {
        theme: themes_1.LIGHT_THEME
    };
    var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
});
