"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _StyledRoomComponents = require("./StyledRoomComponents");
var _native = _interopRequireDefault(require("styled-components/native"));
var _icons = require("../../../assets/icons");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const PlayButton = _native.default.View`
  width: 20px;
  height: 20px;
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #d8ecff;
  margin-top: 1px;
`;
const AudioRow = _native.default.View`
  flex-direction: row;
  align-items: center;
  gap: 6px;
`;
const LastAudioMessage = ({
  user,
  body
}) => {
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_StyledRoomComponents.LastRoomMessageContainer, {
    children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_StyledRoomComponents.LastRoomMessageName, {
      numberOfLines: 1,
      children: user?.name ?? ''
    }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(AudioRow, {
      children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(PlayButton, {
        children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.PlayIcon, {
          width: 10,
          height: 10,
          color: "#1F2937"
        })
      }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_StyledRoomComponents.LastRoomMessageText, {
        numberOfLines: 1,
        children: body?.trim() ? body : 'audio'
      })]
    })]
  });
};
var _default = exports.default = LastAudioMessage;
//# sourceMappingURL=LastAudioMessage.js.map