"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _native = _interopRequireDefault(require("styled-components/native"));
var _StyledRoomComponents = require("./StyledRoomComponents");
var _reactNative = require("react-native");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const VideoContainer = _native.default.View`
  position: relative;
  width: 20px;
  height: 20px;
  overflow: hidden;
  border-radius: 8px;
`;
const Thumbnail = _native.default.Image`
  width: 20px;
  height: 20px;
  border-radius: 8px;
`;
const PlayButton = _native.default.View`
  position: absolute;
  width: 8px;
  height: 9px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 10px;
  pointer-events: none;
  z-index: 100;
`;
const LastMessageVideo = ({
  user,
  location,
  originalName
}) => {
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_StyledRoomComponents.LastRoomMessageContainer, {
    children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_StyledRoomComponents.LastRoomMessageName, {
      children: [user?.name || '', ":"]
    }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
      style: {
        display: 'flex',
        flexDirection: 'row',
        gap: '4px'
      },
      children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(VideoContainer, {
        children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_StyledRoomComponents.ShadeWrapper, {
          children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Thumbnail, {
            src: location
          })
        }), /*#__PURE__*/(0, _jsxRuntime.jsx)(PlayButton, {
          children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
            children: "\u25B6"
          })
        })]
      }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_StyledRoomComponents.LastRoomMessageText, {
        children: originalName || 'file'
      })]
    })]
  });
};
var _default = exports.default = LastMessageVideo;
//# sourceMappingURL=LastMessageVideo.js.map