"use strict";

exports.__esModule = true;
exports.CardComponent = void 0;
var React = _interopRequireWildcard(require("react"));
var _mobxReactLite = require("mobx-react-lite");
var _designSystem = require("@wix/design-system");
var _CardActions = require("./CardActions");
var _KanbanCardTags = require("./KanbanCardTags");
var _jsxFileName = "/home/builduser/work/843658b9f44192f0/packages/cairo/dist/cjs/components/Kanban/Card.tsx";
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 _CardComponent({
  originalItem,
  itemIndex,
  item,
  stageKey,
  actionCell,
  itemActionsState,
  isDragging,
  state,
  tags
}) {
  const {
    title,
    subtitle,
    additionalInfo,
    badge
  } = item;
  return /*#__PURE__*/React.createElement("div", {
    "data-hook": `kanban-card-container-${stageKey}-${item.key}`,
    style: {
      marginRight: '12px',
      marginLeft: '12px',
      overflow: 'visible',
      width: '246px',
      opacity: isDragging ? 0.8 : 1
    },
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 45,
      columnNumber: 5
    }
  }, /*#__PURE__*/React.createElement(_designSystem.ClickableCard, {
    hasPadding: false,
    skin: "shadow",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 55,
      columnNumber: 7
    }
  }, /*#__PURE__*/React.createElement(_designSystem.Box, {
    padding: "12px",
    dataHook: `kanban-card-${stageKey}-${item.key}`,
    direction: "vertical",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 56,
      columnNumber: 9
    }
  }, /*#__PURE__*/React.createElement(_designSystem.Box, {
    marginBottom: "3px",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 61,
      columnNumber: 11
    }
  }, badge), typeof title === 'string' ? /*#__PURE__*/React.createElement(_designSystem.Box, {
    paddingBottom: "3px",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 63,
      columnNumber: 13
    }
  }, /*#__PURE__*/React.createElement(_designSystem.Text, {
    dataHook: `kanban-card-title-${stageKey}-${item.key}`,
    size: "small",
    weight: "normal",
    ellipsis: true,
    maxLines: 2,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 64,
      columnNumber: 15
    }
  }, title)) : /*#__PURE__*/React.createElement(_designSystem.Box, {
    zIndex: 51,
    paddingBottom: "3px",
    dataHook: `kanban-card-title-${stageKey}-${item.key}`,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 75,
      columnNumber: 13
    }
  }, title), /*#__PURE__*/React.createElement(_designSystem.Box, {
    direction: "vertical",
    gap: "1px",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 84,
      columnNumber: 11
    }
  }, tags && /*#__PURE__*/React.createElement(_KanbanCardTags.KanbanCardTags, {
    item: originalItem,
    dataHook: `kanban-card-tags-${stageKey}-${item.key}`,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 86,
      columnNumber: 15
    }
  }), /*#__PURE__*/React.createElement(_designSystem.Box, {
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 91,
      columnNumber: 13
    }
  }, subtitle), /*#__PURE__*/React.createElement(_designSystem.Box, {
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 92,
      columnNumber: 13
    }
  }, additionalInfo)), /*#__PURE__*/React.createElement(_designSystem.Box, {
    align: "right",
    paddingTop: "6px",
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 94,
      columnNumber: 11
    }
  }, /*#__PURE__*/React.createElement(_CardActions.CardActions, {
    actionCell: actionCell,
    originalItem: originalItem,
    itemIndex: itemIndex,
    itemActionsState: itemActionsState,
    stageKey: stageKey,
    item: item,
    state: state,
    __self: this,
    __source: {
      fileName: _jsxFileName,
      lineNumber: 95,
      columnNumber: 13
    }
  })))));
}
const CardComponent = exports.CardComponent = (0, _mobxReactLite.observer)(_CardComponent);
//# sourceMappingURL=Card.js.map