import _defineProperty from "@babel/runtime/helpers/defineProperty";

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }

import makeStyles from "../../styles/makeStyles";

var styles = function styles(_ref) {
  var _ref$cleverUI = _ref.cleverUI,
      spacing = _ref$cleverUI.spacing,
      colors = _ref$cleverUI.colors,
      transitions = _ref$cleverUI.transitions,
      borderRadius = _ref$cleverUI.borderRadius;
  return {
    selectItem: function selectItem(_ref2) {
      var color = _ref2.color;
      return _objectSpread(_objectSpread(_objectSpread({}, spacing["p-0"]), {}, {
        borderRadius: borderRadius.normal,
        position: "relative",
        width: "100%",
        appearance: "none",
        border: "0"
      }, spacing["mb-1"]), {}, {
        textAlign: "left",
        lineHeight: "inherit",
        "&:not(:disabled)": {
          cursor: "pointer"
        },
        "&::before": {
          transition: "transform ".concat(transitions.duration["short"]),
          content: "\"  \"",
          backgroundColor: colors[color][500],
          height: "24px",
          width: "3px",
          top: "10px",
          left: "-4px",
          borderRadius: borderRadius.full,
          position: "absolute",
          transform: "scale(0)"
        }
      });
    },
    selectedSection: function selectedSection() {
      return {
        "&::before": {
          transform: "scale(1)"
        }
      };
    },
    selectItemHover: {
      transition: "background-color ".concat(transitions.duration["short"]),
      "&:hover, &:focus": {
        backgroundColor: "".concat(colors.neutral[100], " !important"),
        outline: "none"
      }
    },
    selectItemCollapsed: {
      "&:hover, &:focus": {
        backgroundColor: "transparent"
      }
    },
    iconButton: {
      "&:hover, &:focus": {
        backgroundColor: "".concat(colors.neutral[100], " !important")
      }
    },

    /* Item component not collapsed, more space for parents */
    iconOpen: _objectSpread(_objectSpread({}, spacing["my-2"]), {}, {
      paddingLeft: "9px",
      paddingRight: "9px",
      display: "flex"
    }),

    /* Item component not collapsed, less space for children */
    iconOpenChild: _objectSpread(_objectSpread({}, spacing["my-1"]), {}, {
      paddingLeft: "9px",
      paddingRight: "9px",
      display: "flex"
    }),

    /* Label chip styles */
    label: function label(_ref3) {
      var color = _ref3.color;
      return _objectSpread(_objectSpread(_objectSpread({}, spacing["p-1"]), spacing["mx-2"]), {}, {
        backgroundColor: colors[color][50],
        width: "fit-content",
        borderRadius: "8px"
      });
    },
    marginNone: {
      margin: 0
    }
  };
};

export default makeStyles(styles);