"use strict";

exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireWildcard(require("react"));
var _reactNative = require("react-native");
var _novaIcons = require("@coorpacademy/nova-icons");
var _templateContext = require("../../template/app-review/template-context");
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
const createStyleSheet = theme => _reactNative.StyleSheet.create({
  skill: {
    display: 'flex',
    flexDirection: 'row',
    overflow: 'hidden',
    alignItems: 'center',
    height: 118,
    borderRadius: 8,
    backgroundColor: theme.colors.gray.lighter,
    marginTop: theme.spacing.micro,
    marginBottom: theme.spacing.micro,
    padding: theme.spacing.base
  },
  skillTexts: {
    flex: 1,
    flexDirection: 'column'
  },
  skillTitle: {
    fontSize: 18,
    fontWeight: '600',
    lineHeight: 22,
    color: theme.colors.text.primary,
    marginBottom: theme.spacing.tiny
  },
  skillInfo: {
    fontSize: 12,
    lineHeight: 16,
    color: theme.colors.gray.medium
  }
});
const SkillCard = props => {
  const templateContext = (0, _templateContext.useTemplateContext)();
  const [styleSheet, setStylesheet] = (0, _react.useState)(null);
  const {
    theme
  } = templateContext;
  const {
    skillTitle,
    skillAriaLabel,
    reviseLabel,
    reviseAriaLabel,
    onClick,
    buttonAriaLabel
  } = props;
  (0, _react.useEffect)(() => {
    const _stylesheet = createStyleSheet(theme);
    setStylesheet(_stylesheet);
  }, [theme]);
  if (!styleSheet) {
    return null;
  }
  return /*#__PURE__*/_react.default.createElement(_reactNative.Pressable, {
    style: styleSheet.skill,
    onPress: onClick,
    accessibilityRole: "button",
    accessibilityLabel: buttonAriaLabel
  }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
    style: styleSheet.skillTexts
  }, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
    style: styleSheet.skillTitle,
    accessibilityLabel: skillAriaLabel || skillTitle
  }, skillTitle), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
    style: styleSheet.skillInfo,
    accessibilityLabel: reviseAriaLabel
  }, reviseLabel)), /*#__PURE__*/_react.default.createElement(_novaIcons.NovaCompositionNavigationArrowRight, {
    color: "#ededed",
    height: 20,
    width: 20
  }));
};
var _default = exports.default = SkillCard;
//# sourceMappingURL=index.native.js.map