"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
function _export(target, all) {
    for(var name in all)Object.defineProperty(target, name, {
        enumerable: true,
        get: Object.getOwnPropertyDescriptor(all, name).get
    });
}
_export(exports, {
    get ContentRight () {
        return ContentRight;
    },
    get IconArrowWrapper () {
        return IconArrowWrapper;
    },
    get Line () {
        return Line;
    },
    get SpinnerStyled () {
        return SpinnerStyled;
    },
    get StyledArrow () {
        return StyledArrow;
    },
    get StyledFolder () {
        return StyledFolder;
    },
    get Title () {
        return Title;
    },
    get TitleWrapper () {
        return TitleWrapper;
    },
    get base () {
        return base;
    }
});
const _styledcomponents = /*#__PURE__*/ _interop_require_wildcard(require("styled-components"));
const _Spinner = require("../Spinner");
const _engines = require("../../engines");
const _Icon = require("../_Icon");
const _Treetokens = require("./Tree.tokens");
function _getRequireWildcardCache(nodeInterop) {
    if (typeof WeakMap !== "function") return null;
    var cacheBabelInterop = new WeakMap();
    var cacheNodeInterop = new WeakMap();
    return (_getRequireWildcardCache = function(nodeInterop) {
        return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
    })(nodeInterop);
}
function _interop_require_wildcard(obj, nodeInterop) {
    if (!nodeInterop && obj && obj.__esModule) {
        return obj;
    }
    if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
        return {
            default: obj
        };
    }
    var cache = _getRequireWildcardCache(nodeInterop);
    if (cache && cache.has(obj)) {
        return cache.get(obj);
    }
    var newObj = {
        __proto__: null
    };
    var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
    for(var key in obj){
        if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
            var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
            if (desc && (desc.get || desc.set)) {
                Object.defineProperty(newObj, key, desc);
            } else {
                newObj[key] = obj[key];
            }
        }
    }
    newObj.default = obj;
    if (cache) {
        cache.set(obj, newObj);
    }
    return newObj;
}
const mergedConfig = (0, _engines.mergeConfig)(_Spinner.spinnerConfig);
const Spinner = (0, _engines.component)(mergedConfig);
const IconArrowWrapper = _styledcomponents.default.div.withConfig({
    displayName: "Tree.styles__IconArrowWrapper",
    componentId: "sc-9a95b44e-0"
})([
    `line-height:0;color:var(`,
    `);&:hover{color:var(`,
    `);}&:active{color:var(`,
    `);}`
], _Treetokens.treeTokens.arrowColor, _Treetokens.treeTokens.arrowColorHover, _Treetokens.treeTokens.arrowColorActive);
const StyledArrow = (0, _styledcomponents.default)(_Icon.IconDisclosureRightCentered).withConfig({
    displayName: "Tree.styles__StyledArrow",
    componentId: "sc-9a95b44e-1"
})([
    `transition:color 0.3s ease-in,transform 0.15s ease-in;pointer-events:none;user-select:none;`
]);
const StyledFolder = (0, _styledcomponents.default)(_Icon.IconFolder).withConfig({
    displayName: "Tree.styles__StyledFolder",
    componentId: "sc-9a95b44e-2"
})([
    ``
]);
const TitleWrapper = _styledcomponents.default.div.withConfig({
    displayName: "Tree.styles__TitleWrapper",
    componentId: "sc-9a95b44e-3"
})([
    `display:flex;align-items:center;justify-content:space-between;margin:`,
    `;overflow:`,
    `;`
], ({ arrowPlacement, fullWidthItemSelection })=>arrowPlacement === 'left' && !fullWidthItemSelection ? `var(${_Treetokens.treeTokens.iconFolderMargin})` : 0, ({ singleLine })=>singleLine ? 'hidden' : 'visible');
const Title = _styledcomponents.default.span.withConfig({
    displayName: "Tree.styles__Title",
    componentId: "sc-9a95b44e-4"
})([
    `margin:var(`,
    `);overflow:`,
    `;text-overflow:`,
    `;white-space:`,
    `;`
], _Treetokens.treeTokens.iconFolderMargin, ({ singleLine })=>singleLine ? 'hidden' : 'visible', ({ singleLine })=>singleLine ? 'ellipsis' : 'unset', ({ singleLine })=>singleLine ? 'nowrap' : 'normal');
const ContentRight = _styledcomponents.default.div.withConfig({
    displayName: "Tree.styles__ContentRight",
    componentId: "sc-9a95b44e-5"
})([
    `line-height:0;`
]);
const Line = _styledcomponents.default.div.withConfig({
    displayName: "Tree.styles__Line",
    componentId: "sc-9a95b44e-6"
})([
    `top:`,
    `;left:`,
    `px;bottom:`,
    `;right:0;position:absolute;z-index:1;height:0.125rem;background-color:var(`,
    `);border-radius:1px;pointer-events:none;`
], ({ dropPosition, variant })=>dropPosition === -1 ? `calc(var(${variant === 'normal' ? _Treetokens.treeTokens.itemPaddingTop : _Treetokens.treeTokens.itemPaddingTightTop}) * -1)` : 'auto', ({ left })=>left, ({ dropPosition, variant })=>dropPosition !== -1 ? `calc(var(${variant === 'normal' ? _Treetokens.treeTokens.itemPaddingBottom : _Treetokens.treeTokens.itemPaddingTightBottom}) * -1)` : 'auto', _Treetokens.treeTokens.itemDraggableLineColor);
const base = (0, _styledcomponents.css)([
    `.rc-tree{margin:0;border:1px solid transparent;}.rc-tree-focused:not(.rc-tree-active-focused){border-color:cyan;}.rc-tree .rc-tree-treenode{display:flex;align-items:center;box-sizing:border-box;margin:0;padding-top:var(`,
    `);padding-right:var(`,
    `);padding-bottom:var(`,
    `);padding-left:var(`,
    `);position:relative;z-index:0;width:100%;line-height:24px;white-space:nowrap;list-style:none;outline:0;}.rc-tree.`,
    ` .rc-tree-treenode{padding-top:var(`,
    `);padding-right:var(`,
    `);padding-bottom:var(`,
    `);padding-left:var(`,
    `);}.rc-tree .rc-tree-treenode .draggable{color:#333;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;user-select:none;}.rc-tree .rc-tree-treenode.dragging{opacity:0.28;}.rc-tree .rc-tree-treenode.drop-container::before,.rc-tree:not(:has(.drop-container)) .rc-tree-treenode.drop-target.`,
    `::before,.rc-tree:not(:has(.drop-container)) .rc-tree-treenode.drop-target.drag-over::before{box-shadow:inset 0 0 0 1px var(`,
    `);}.rc-tree .rc-tree-treenode.filter-node > .rc-tree-node-content-wrapper{color:#a60000 !important;font-weight:bold !important;}.rc-tree .rc-tree-treenode ul{margin:0;padding:0 0 0 18px;}.rc-tree .rc-tree-treenode .rc-tree-node-content-wrapper{position:relative;margin:0;padding:0;text-decoration:none;vertical-align:top;cursor:pointer;color:var(`,
    `);display:flex;align-items:center;width:100%;}.rc-tree.`,
    ` .rc-tree-treenode.rc-tree-treenode-selected .rc-tree-node-content-wrapper{cursor:default;}.rc-tree .rc-tree-treenode.rc-tree-treenode-disabled .rc-tree-node-content-wrapper,.rc-tree .rc-tree-treenode.rc-tree-treenode-disabled span.rc-tree-switcher,.rc-tree .rc-tree-treenode.rc-tree-treenode-disabled span.rc-tree-checkbox,.rc-tree .rc-tree-treenode.rc-tree-treenode-disabled span.rc-tree-iconEle{cursor:default;}.rc-tree .rc-tree-treenode span.rc-tree-switcher,.rc-tree .rc-tree-treenode span.rc-tree-checkbox,.rc-tree .rc-tree-treenode span.rc-tree-iconEle{cursor:pointer;}.rc-tree .rc-tree-treenode span.rc-tree-switcher.rc-tree-icon__customize,.rc-tree .rc-tree-treenode span.rc-tree-checkbox.rc-tree-icon__customize,.rc-tree .rc-tree-treenode span.rc-tree-iconEle.rc-tree-icon__customize{background-image:none;}.rc-tree .rc-tree-treenode span.rc-tree-icon_loading{}.rc-tree .rc-tree-treenode span.rc-tree-switcher.rc-tree-switcher-noop{flex:none;}.rc-tree.`,
    ` .rc-tree-treenode span.rc-tree-switcher.rc-tree-switcher-noop{display:none;}.rc-tree .rc-tree-treenode span.rc-tree-switcher.rc-tree-switcher_open{background-position:-93px -56px;}.rc-tree .rc-tree-treenode span.rc-tree-switcher.rc-tree-switcher_close{background-position:-75px -56px;}.rc-tree .rc-tree-treenode span.rc-tree-checkbox{width:13px;height:13px;margin:0 3px;background-position:0 0;}.rc-tree .rc-tree-treenode span.rc-tree-checkbox-checked{background-position:-14px 0;}.rc-tree .rc-tree-treenode span.rc-tree-checkbox-indeterminate{background-position:-14px -28px;}.rc-tree .rc-tree-treenode span.rc-tree-checkbox-disabled{background-position:0 -56px;}.rc-tree .rc-tree-treenode span.rc-tree-checkbox.rc-tree-checkbox-checked.rc-tree-checkbox-disabled{background-position:-14px -56px;}.rc-tree .rc-tree-treenode span.rc-tree-checkbox.rc-tree-checkbox-indeterminate.rc-tree-checkbox-disabled{position:relative;background:#ccc;border-radius:3px;}.rc-tree .rc-tree-treenode span.rc-tree-checkbox.rc-tree-checkbox-indeterminate.rc-tree-checkbox-disabled::after{position:absolute;top:5px;left:3px;width:5px;height:0;border:2px solid #fff;border-top:0;border-left:0;-webkit-transform:scale(1);transform:scale(1);content:' ';}.rc-tree:not(.rc-tree-show-line) .rc-tree-treenode .rc-tree-switcher-noop{background:none;}.rc-tree.rc-tree-show-line .rc-tree-treenode:not(:last-child) > .rc-tree-switcher-noop{background-position:-56px -18px;}.rc-tree.rc-tree-show-line .rc-tree-treenode:last-child > .rc-tree-switcher-noop{background-position:-56px -36px;}.rc-tree-child-tree{display:none;}.rc-tree-child-tree-open{display:block;}.rc-tree-treenode-disabled > span:not(.rc-tree-switcher),.rc-tree-treenode-disabled > a,.rc-tree-treenode-disabled > a span{color:#767676;cursor:not-allowed;}.rc-tree-treenode-active{background:rgba(0,0,0,0.1);}.rc-tree-node-selected{background-color:#ffe6b0;box-shadow:0 0 0 1px #ffb951;opacity:0.8;}.rc-tree-icon__open{margin-right:0;vertical-align:top;background-position:-110px -16px;}.rc-tree-icon__close{margin-right:0;vertical-align:top;background-position:-110px 0;}.rc-tree-icon__docu{margin-right:0;vertical-align:top;background-position:-110px -32px;}.rc-tree-icon__customize{display:block;line-height:0;color:var(`,
    `);margin:var(`,
    `);}.rc-tree-title{display:grid;width:100%;}.rc-tree-indent{display:inline-flex;height:0;vertical-align:bottom;}.rc-tree-indent-unit{display:inline-block;width:16px;}.rc-tree-draggable-icon{display:inline-flex;justify-content:center;width:16px;}.rc-tree,.rc-tree-list{border:none !important;}.rc-tree .rc-tree-list-holder{overflow:hidden auto;}.rc-tree .rc-tree-treenode::before{content:'';position:absolute;z-index:-1;top:var(`,
    `);bottom:var(`,
    `);left:calc(var(`,
    `) + var(`,
    `));right:0;background:transparent;border-radius:var(`,
    `);}.rc-tree .rc-tree-treenode.rc-tree-treenode-disabled .rc-tree-node-content-wrapper,.rc-tree .rc-tree-treenode.rc-tree-treenode-disabled .rc-tree-switcher,.rc-tree .rc-tree-treenode.rc-tree-treenode-disabled .rc-tree-checkbox{opacity:var(`,
    `);}.rc-tree.`,
    ` .rc-tree-treenode::before{inset:0;border-radius:0;}.rc-tree .rc-tree-treenode.`,
    `:not(.rc-tree-treenode-disabled) .rc-tree-title{color:var(`,
    `);}.rc-tree .rc-tree-treenode.`,
    `:not(.rc-tree-treenode-disabled) .rc-tree-icon__customize{color:var(`,
    `);}.rc-tree .rc-tree-treenode.`,
    `::before{background:var(`,
    `);}.rc-tree .rc-tree-treenode.rc-tree-treenode-selected::before{background:var(`,
    `);}.rc-tree .rc-tree-treenode:not(.rc-tree-treenode-disabled):not(.rc-tree.`,
    ` .rc-tree-treenode.rc-tree-treenode-selected):hover::before{background:var(`,
    `);}.rc-tree .rc-tree-treenode:not(.rc-tree-treenode-disabled):not(.rc-tree.`,
    ` .rc-tree-treenode.rc-tree-treenode-selected):active::before{background:var(`,
    `);}.rc-tree .rc-tree-treenode span.rc-tree-switcher{display:flex;align-items:center;justify-content:center;width:var(`,
    `);height:var(`,
    `);margin:var(`,
    `);line-height:0;vertical-align:0;background:transparent;flex:none;}.rc-tree.`,
    ` .rc-tree-treenode span.rc-tree-switcher{margin:var(`,
    `);}.rc-tree .rc-tree-treenode span.rc-tree-switcher.rc-tree-switcher_open .arrow{transform:rotate(90deg);}.rc-tree.`,
    ` .rc-tree-treenode span.rc-tree-switcher.rc-tree-switcher_close .arrow{transform:rotate(90deg);}.rc-tree.`,
    ` .rc-tree-treenode span.rc-tree-switcher.rc-tree-switcher_open .arrow{transform:rotate(0);}.rc-tree .rc-tree-treenode span.rc-tree-checkbox{display:flex;align-items:center;justify-content:center;line-height:0;vertical-align:0;width:var(`,
    `);height:var(`,
    `);margin:var(`,
    `);background-image:none;flex:none;}.rc-tree .rc-tree-treenode span.rc-tree-checkbox::before{content:'';display:block;width:var(`,
    `);height:var(`,
    `);border:0.125rem solid var(`,
    `);border-radius:var(`,
    `);box-sizing:border-box;background-size:contain;background-repeat:no-repeat;}.rc-tree .rc-tree-treenode.rc-tree-treenode-disabled span.rc-tree-checkbox::before{border:0.125rem solid var(`,
    `);}.rc-tree .rc-tree-treenode span.rc-tree-checkbox-checked::before{background-color:var(`,
    `);border-color:var(`,
    `);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none'%3E%3Cpath fill='white' d='m5.70711,8.15582c-0.39053,-0.39052 -1.02369,-0.39052 -1.41422,0c-0.39052,0.39053 -0.39052,1.02369 0,1.41422l3.70666,3.70666l6.71095,-6.70248c0.3908,-0.39027 0.3912,-1.02344 0.0009,-1.41421c-0.3903,-0.39077 -1.02344,-0.39117 -1.41421,-0.00089l-5.29674,5.29004l-2.29334,-2.29334z' /%3E%3C/svg%3E");}.rc-tree .rc-tree-treenode span.rc-tree-checkbox.rc-tree-checkbox-indeterminate::before{background-color:var(`,
    `);border-color:var(`,
    `);background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 8a1 1 0 011-1h10a1 1 0 110 2H3a1 1 0 01-1-1z' fill='white'/%3E%3C/svg%3E");}.rc-tree-title{color:var(`,
    `);font-family:var(`,
    `);font-size:var(`,
    `);font-style:var(`,
    `);font-weight:var(`,
    `);letter-spacing:var(`,
    `);line-height:var(`,
    `);}.rc-tree.`,
    ` .rc-tree-treenode span.rc-tree-switcher{order:1;}.rc-tree.`,
    ` .rc-tree-treenode::before{left:0;}.rc-tree-node-selected{opacity:1;box-shadow:none;background:none;}.rc-tree-node-selected .rc-tree-title{color:var(`,
    `);}.rc-tree .rc-tree-treenode.rc-tree-treenode-disabled .rc-tree-title{color:var(`,
    `);}.rc-tree-node-selected .rc-tree-icon__customize{color:var(`,
    `);}.rc-tree .rc-tree-treenode.rc-tree-treenode-disabled .rc-tree-icon__customize{color:var(`,
    `);}.rc-tree-indent-unit{width:var(`,
    `);}`
], _Treetokens.treeTokens.itemPaddingTop, _Treetokens.treeTokens.itemPaddingRight, _Treetokens.treeTokens.itemPaddingBottom, _Treetokens.treeTokens.itemPaddingLeft, _Treetokens.classes.treeTightVariant, _Treetokens.treeTokens.itemPaddingTightTop, _Treetokens.treeTokens.itemPaddingTightRight, _Treetokens.treeTokens.itemPaddingTightBottom, _Treetokens.treeTokens.itemPaddingTightLeft, _Treetokens.classes.treeLeafNode, _Treetokens.treeTokens.itemDraggableBorderColor, _Treetokens.treeTokens.color, _Treetokens.classes.treeRadioMode, _Treetokens.classes.treeInverted, _Treetokens.treeTokens.iconFolderColor, _Treetokens.treeTokens.iconFolderMargin, _Treetokens.treeTokens.itemTop, _Treetokens.treeTokens.itemBottom, _Treetokens.treeTokens.switcherSize, _Treetokens.treeTokens.itemBackgroundExtraOffset, _Treetokens.treeTokens.itemBorderRadius, _Treetokens.treeTokens.itemDisabledOpacity, _Treetokens.classes.treeItemFilled, _Treetokens.classes.treeItemHasSelectedChildren, _Treetokens.treeTokens.colorSelected, _Treetokens.classes.treeItemHasSelectedChildren, _Treetokens.treeTokens.colorSelected, _Treetokens.classes.treeItemPrimaryBackground, _Treetokens.treeTokens.itemBackgroundColorPrimary, _Treetokens.treeTokens.itemBackgroundColorSelected, _Treetokens.classes.treeRadioMode, _Treetokens.treeTokens.itemBackgroundColorHover, _Treetokens.classes.treeRadioMode, _Treetokens.treeTokens.itemBackgroundColorActive, _Treetokens.treeTokens.switcherSize, _Treetokens.treeTokens.switcherSize, _Treetokens.treeTokens.switcherMargin, _Treetokens.classes.treeInverted, _Treetokens.treeTokens.switcherMarginInverted, _Treetokens.classes.treeInverted, _Treetokens.classes.treeInverted, _Treetokens.treeTokens.checkboxSize, _Treetokens.treeTokens.checkboxSize, _Treetokens.treeTokens.checkboxMargin, _Treetokens.treeTokens.checkboxInnerSize, _Treetokens.treeTokens.checkboxInnerSize, _Treetokens.treeTokens.checkboxBorderColor, _Treetokens.treeTokens.checkboxBorderRadius, _Treetokens.treeTokens.itemDisabledBorderColor, _Treetokens.treeTokens.checkboxBackgroundColor, _Treetokens.treeTokens.checkboxBackgroundColor, _Treetokens.treeTokens.checkboxBackgroundColor, _Treetokens.treeTokens.checkboxBackgroundColor, _Treetokens.treeTokens.color, _Treetokens.treeTokens.fontFamily, _Treetokens.treeTokens.fontSize, _Treetokens.treeTokens.fontStyle, _Treetokens.treeTokens.fontWeight, _Treetokens.treeTokens.letterSpacing, _Treetokens.treeTokens.lineHeight, _Treetokens.classes.treeInverted, _Treetokens.classes.treeInverted, _Treetokens.treeTokens.colorSelected, _Treetokens.treeTokens.itemDisabledColor, _Treetokens.treeTokens.colorSelected, _Treetokens.treeTokens.itemDisabledColor, _Treetokens.treeTokens.itemIndent);
const SpinnerStyled = (0, _styledcomponents.default)(Spinner).withConfig({
    displayName: "Tree.styles__SpinnerStyled",
    componentId: "sc-9a95b44e-7"
})([
    ``,
    `:100%;`,
    `:var(`,
    `);`
], _Spinner.spinnerTokens.size, _Spinner.spinnerTokens.color, _Treetokens.treeTokens.arrowColor);
