"use strict";

exports.__esModule = true;
exports.Label = exports.NonIndicator = exports.BeforeIndicator = exports.Indicator = void 0;

var _styledComponents = _interopRequireWildcard(require("styled-components"));

var _Icon = _interopRequireDefault(require("../Icon"));

var _utils = require("../../utils");

var _settings = require("./settings");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

function _interopRequireWildcard(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 = {}; 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; }

(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();

(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();

var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
  return a;
};

var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
  return a;
};

var Indicator = (0, _styledComponents.default)(_Icon.default).attrs(function (props) {
  return {
    id: (0, _utils.ifFlag)("open", (0, _utils.getThemeProp)(["icons", "indicators", "down"], "chevron-down"), (0, _utils.getThemeProp)(["icons", "indicators", "right"], "chevron-right"))(props)
  };
}).withConfig({
  displayName: "Label__Indicator",
  componentId: "sc-eaonh1-0"
})(["font-size:10px;padding:10px 0 10px 10px;cursor:pointer;flex:0 0 auto;color:", ";"], (0, _utils.ifFlag)("open", (0, _utils.ifFlag)("dark", (0, _utils.getThemeProp)(["colors", "textLight"], "#cccccc"), (0, _utils.getThemeProp)(["colors", "text"], "#333333")), (0, _utils.getThemeProp)(["colors", "application", "base"], "#ffffff")));
exports.Indicator = Indicator;

var BeforeIndicator = _styledComponents.default.div.withConfig({
  displayName: "Label__BeforeIndicator",
  componentId: "sc-eaonh1-1"
})(["background-color:#666;margin-left:-", "px;width:", "px;height:1px;z-index:99;position:absolute;"], function (props) {
  return (0, _settings.branchLength)(props) + 1;
}, function (props) {
  return (0, _settings.branchLength)(props) + 1;
});

exports.BeforeIndicator = BeforeIndicator;

var NonIndicator = _styledComponents.default.div.withConfig({
  displayName: "Label__NonIndicator",
  componentId: "sc-eaonh1-2"
})(["height:1px;width:", "px;margin:auto 0 auto -", "px;background-color:#666;align-self:stretch;flex:0 0 auto;z-index:99;"], function (props) {
  return (0, _settings.branchLength)(props) + 21;
}, function (props) {
  return (0, _settings.branchLength)(props) + 1;
});

exports.NonIndicator = NonIndicator;

var Label = _styledComponents.default.div.withConfig({
  displayName: "Label",
  componentId: "sc-eaonh1-3"
})(["cursor:pointer;flex-grow:1;width:100%;", ";"], (0, _utils.ifFlag)("isSelectedNode", (0, _styledComponents.css)(["background-color:#222;border:1px solid ", ";"], (0, _utils.getThemeProp)(["colors", "application", "base"], "#0F4E66"))));

exports.Label = Label;
;

(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;

  if (!reactHotLoader) {
    return;
  }

  reactHotLoader.register(Indicator, "Indicator", "/home/vsts/work/1/s/src/components/Treeview/Label.js");
  reactHotLoader.register(BeforeIndicator, "BeforeIndicator", "/home/vsts/work/1/s/src/components/Treeview/Label.js");
  reactHotLoader.register(NonIndicator, "NonIndicator", "/home/vsts/work/1/s/src/components/Treeview/Label.js");
  reactHotLoader.register(Label, "Label", "/home/vsts/work/1/s/src/components/Treeview/Label.js");
})();

;

(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();

;

(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;

  if (!reactHotLoader) {
    return;
  }

  reactHotLoader.register(Indicator, "Indicator", "/home/vsts/work/1/s/src/components/Treeview/Label.js");
  reactHotLoader.register(BeforeIndicator, "BeforeIndicator", "/home/vsts/work/1/s/src/components/Treeview/Label.js");
  reactHotLoader.register(NonIndicator, "NonIndicator", "/home/vsts/work/1/s/src/components/Treeview/Label.js");
  reactHotLoader.register(Label, "Label", "/home/vsts/work/1/s/src/components/Treeview/Label.js");
})();

;

(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();