"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.RoomCard = void 0;
var _ui = require("@mirai/ui");
var _propTypes = _interopRequireDefault(require("prop-types"));
var _react = _interopRequireDefault(require("react"));
var style = _interopRequireWildcard(require("../Booking.module.css"));
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
const RoomCard = _ref => {
  let {
    className,
    image,
    occupation,
    onPress,
    plan,
    rate,
    selected = false,
    testId,
    title
  } = _ref;
  const Container = onPress ? _ui.Pressable : _ui.View;
  return /*#__PURE__*/_react.default.createElement(Container, _extends({
    className: (0, _ui.styles)(style.option, selected && style.optionSelected, className)
  }, onPress ? {
    onPress
  } : undefined, {
    testId: testId
  }), /*#__PURE__*/_react.default.createElement(_ui.View, {
    row: true,
    className: style.optionContent
  }, /*#__PURE__*/_react.default.createElement(_ui.View, {
    "aria-label": title,
    role: "img",
    className: style.optionImage,
    style: image ? {
      backgroundImage: "url(".concat(image, ")")
    } : undefined
  }), /*#__PURE__*/_react.default.createElement(_ui.View, {
    className: style.optionDetails
  }, /*#__PURE__*/_react.default.createElement(_ui.Text, {
    action: true,
    bold: true
  }, title), rate ? /*#__PURE__*/_react.default.createElement(_ui.Text, {
    small: true
  }, rate) : undefined, occupation ? /*#__PURE__*/_react.default.createElement(_ui.Text, {
    small: true
  }, occupation) : undefined, plan ? /*#__PURE__*/_react.default.createElement(_ui.Text, {
    small: true
  }, plan) : undefined)));
};
exports.RoomCard = RoomCard;
RoomCard.displayName = 'Mirai:Core:Booking:RoomCard';
RoomCard.propTypes = {
  className: _propTypes.default.string,
  image: _propTypes.default.string,
  occupation: _propTypes.default.string,
  onPress: _propTypes.default.func,
  plan: _propTypes.default.string,
  rate: _propTypes.default.string,
  selected: _propTypes.default.bool,
  testId: _propTypes.default.string,
  title: _propTypes.default.string
};
//# sourceMappingURL=Booking.RoomCard.js.map