"use strict";
Object.defineProperty(exports, "__esModule", {
  value: !0
}), exports.default = void 0;
var _react = _interopRequireDefault(require("react")),
  _propTypes = _interopRequireDefault(require("prop-types")),
  _amosIcon = _interopRequireDefault(require("amos-icon")),
  _classnames = _interopRequireDefault(require("classnames"));

function _interopRequireDefault(e) {
  return e && e.__esModule ? e : {
    default: e
  }
}
var footerSpans = [{
    key: "f1",
    style: {
      backgroundColor: "#00bbd3"
    }
  }, {
    key: "f2",
    style: {
      backgroundColor: "#8ac249"
    }
  }, {
    key: "f3",
    style: {
      backgroundColor: "#fc0"
    }
  }, {
    key: "f4",
    style: {
      backgroundColor: "#e6564a"
    }
  }],
  SkinItem = function(e) {
    var t = e.skinImg,
      a = e.name,
      r = e.bgColor,
      n = void 0 === r ? "transparent" : r,
      s = e.skinUse,
      r = e.onThemeChange,
      e = (0, _classnames.default)("skin-item", {
        normal: !s,
        used: s
      });
    return _react.default.createElement("div", {
      className: e,
      onClick: r
    }, _react.default.createElement("img", {
      src: t,
      alt: ""
    }), _react.default.createElement("div", {
      className: "skin-name",
      style: {
        backgroundColor: n
      }
    }, a), _react.default.createElement("div", {
      className: "skin-footer"
    }, footerSpans.map(function(e) {
      return _react.default.createElement("span", {
        key: e.key,
        style: e.style
      })
    })), _react.default.createElement("div", {
      className: "skin-check",
      style: {
        backgroundColor: n
      }
    }, "选用皮肤"), _react.default.createElement("div", {
      className: "skin-use",
      style: {
        display: s ? "block" : "none"
      }
    }, _react.default.createElement(_amosIcon.default, {
      icon: "xuanzhong"
    }), "使用中"))
  };
SkinItem.displayName = "SkinItem", SkinItem.propTypes = {
  skinImg: _propTypes.default.string,
  name: _propTypes.default.string,
  bgColor: _propTypes.default.string,
  skinUse: _propTypes.default.bool,
  onThemeChange: _propTypes.default.func
}, SkinItem.defaultProps = {
  skinUse: !1
};
var _default = SkinItem;
exports.default = SkinItem, module.exports = exports.default;
