"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _StyledComponents = require("../styled/StyledComponents");
var _Button = _interopRequireDefault(require("../styled/Button"));
var _icons = require("../../assets/icons");
var _reactRedux = require("react-redux");
var _roomsSlice = require("../../roomStore/roomsSlice");
var _reactNative = require("react-native");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const ThreadHeader = ({
  chatJID
}) => {
  const dispatch = (0, _reactRedux.useDispatch)();
  const handleCloseThread = () => {
    dispatch((0, _roomsSlice.setCloseActiveMessage)({
      chatJID: chatJID
    }));
  };
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_StyledComponents.ChatContainerHeader, {
    children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
      style: {
        display: 'flex',
        gap: 8
      },
      children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_StyledComponents.ChatContainerHeaderLabel, {
        children: "Thread"
      })
    }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
      style: {
        display: 'flex',
        gap: 16
      },
      children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.default, {
        style: {
          padding: 8
        },
        EndIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.CloseIcon, {}),
        unstyled: true,
        onPress: handleCloseThread
      })
    })]
  });
};
var _default = exports.default = ThreadHeader;
//# sourceMappingURL=ThreadHeader.js.map