"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.styles = void 0;

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (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 = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var wrapper = {
  display: 'inline-block',
  position: 'relative',
  minWidth: 200,
  font: 'inherit'
};

var root = function root(theme) {
  return _objectSpread({
    outline: 'none',
    font: 'inherit',
    width: '100%',
    borderRadius: 2,
    border: '2px solid',
    borderColor: theme.colors.standard["default"],
    transition: theme.transitions.input,
    // ${th.size('medium.input')},
    '&:hover': {
      borderColor: theme.colors.standard.dark1
    },
    '&:active, &:focus': {
      borderColor: theme.colors.primary["default"]
    },
    '&:disabled': {
      color: theme.colors.standard.dark2,
      backgroundColor: theme.colors.standard.light1,
      cursor: 'not-allowed',
      pointerEvents: 'none'
    }
  }, theme.sizes.medium.input);
};

var error = function error(theme) {
  return {
    borderColor: theme.colors.error["default"],
    '&:hover': {
      borderColor: theme.colors.error["default"]
    },
    '&:active, &:focus': {
      borderColor: theme.colors.error["default"]
    }
  };
};

var clearedIcon = function clearedIcon(theme) {
  return {
    height: '100%',
    position: 'absolute',
    right: 0,
    top: 0,
    fontSize: 12,
    cursor: 'pointer',
    display: 'inline-flex',
    justifyContent: 'center',
    alignItems: 'center',
    transition: theme.transitions.input,
    '&:hover': {
      backgroundColor: theme.colors.primary["default"],
      color: theme.colors.white["default"]
    }
  };
};

var styles = function styles(theme) {
  return {
    root: root(theme),
    error: error(theme),
    wrapper: wrapper,
    clearedIcon: clearedIcon(theme)
  };
};

exports.styles = styles;