"use strict";

import { ChatContainerHeader, ChatContainerHeaderLabel } from '../styled/StyledComponents';
import Button from '../styled/Button';
import { CloseIcon } from '../../assets/icons';
import { useDispatch } from 'react-redux';
import { setCloseActiveMessage } from '../../roomStore/roomsSlice';
import { View } from 'react-native';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
const ThreadHeader = ({
  chatJID
}) => {
  const dispatch = useDispatch();
  const handleCloseThread = () => {
    dispatch(setCloseActiveMessage({
      chatJID: chatJID
    }));
  };
  return /*#__PURE__*/_jsxs(ChatContainerHeader, {
    children: [/*#__PURE__*/_jsx(View, {
      style: {
        display: 'flex',
        gap: 8
      },
      children: /*#__PURE__*/_jsx(ChatContainerHeaderLabel, {
        children: "Thread"
      })
    }), /*#__PURE__*/_jsx(View, {
      style: {
        display: 'flex',
        gap: 16
      },
      children: /*#__PURE__*/_jsx(Button, {
        style: {
          padding: 8
        },
        EndIcon: /*#__PURE__*/_jsx(CloseIcon, {}),
        unstyled: true,
        onPress: handleCloseThread
      })
    })]
  });
};
export default ThreadHeader;
//# sourceMappingURL=ThreadHeader.js.map