"use strict";

import React, { createContext } from 'react';
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native';
import { jsx as _jsx } from "react/jsx-runtime";
// Container with burger menu support
export const Container = ({
  burgerMenu,
  open,
  children
}) => /*#__PURE__*/_jsx(View, {
  style: [styles.container, burgerMenu && open ? styles.containerOpen : styles.containerClosed, burgerMenu && styles.burgerMenu],
  children: children
});

// Button for the burger menu
export const BurgerButton = ({
  onPress
}) => /*#__PURE__*/_jsx(TouchableOpacity, {
  style: styles.burgerButton,
  onPress: onPress,
  children: /*#__PURE__*/_jsx(Text, {
    style: styles.burgerButtonText,
    children: "\u2630"
  })
});

// Chat item
const ColorContext = /*#__PURE__*/createContext(undefined);
export const ChatItem = ({
  children
}) => {
  return /*#__PURE__*/_jsx(View, {
    style: styles.chatItem,
    children: children
  });
};

// Search container for the chat area
export const SearchContainer = ({
  children
}) => /*#__PURE__*/_jsx(View, {
  style: styles.searchContainer,
  children: children
});

// Scrollable container
export const ScollableContainer = ({
  children
}) => /*#__PURE__*/_jsx(View, {
  style: styles.scollableContainer,
  children: children
});

// Chat info (name & last message)
export const ChatInfo = ({
  children
}) => /*#__PURE__*/_jsx(View, {
  style: styles.chatInfo,
  children: children
});

// Chat name and last message display
export const ChatName = ({
  text
}) => /*#__PURE__*/_jsx(Text, {
  style: styles.chatName,
  children: text
});
export const LastMessage = ({
  children
}) => /*#__PURE__*/_jsx(Text, {
  style: styles.lastMessage,
  children: children
});

// User count display for the chat
export const UserCount = ({
  style,
  text
}) => /*#__PURE__*/_jsx(Text, {
  style: [styles.userCount, style],
  children: text
});
export const Viewider = () => /*#__PURE__*/_jsx(View, {
  style: styles.viewider
});
const styles = StyleSheet.create({
  container: {
    padding: 16,
    paddingTop: 0,
    backgroundColor: '#fff',
    overflow: 'hidden'
  },
  burgerMenu: {
    position: 'absolute',
    left: 0,
    top: 0,
    width: 300,
    height: '100%',
    transform: [{
      translateX: -300
    }],
    display: 'flex',
    flexDirection: 'column',
    backgroundColor: '#fff',
    padding: 16,
    borderRightWidth: 1,
    borderRightColor: '#f0f0f0'
  },
  containerOpen: {
    transform: [{
      translateX: 0
    }]
  },
  containerClosed: {
    transform: [{
      translateX: -300
    }]
  },
  burgerButton: {
    position: 'absolute',
    left: 10,
    top: 10,
    padding: 10
  },
  burgerButtonText: {
    fontSize: 24,
    color: '#333'
  },
  chatItem: {
    borderRadius: 16,
    gap: 16,
    color: '#000',
    flexDirection: 'row',
    justifyContent: 'flex-start'
  },
  searchContainer: {
    display: 'flex',
    gap: 16,
    alignItems: 'center',
    justifyContent: 'center',
    height: 50,
    paddingHorizontal: 12
  },
  scollableContainer: {
    flexGrow: 1,
    display: 'flex',
    flexDirection: 'column'
  },
  chatInfo: {
    maxWidth: '60%'
  },
  chatName: {
    fontWeight: 'bold'
  },
  lastMessage: {
    color: '#999'
  },
  userCount: {
    marginLeft: 'auto'
  },
  viewider: {
    height: 1,
    width: '100%',
    backgroundColor: '#0052cd0d'
  }
});
//# sourceMappingURL=index.js.map