"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.Viewider = exports.UserCount = exports.SearchContainer = exports.ScollableContainer = exports.LastMessage = exports.Container = exports.ChatName = exports.ChatItem = exports.ChatInfo = exports.BurgerButton = void 0;
var _react = _interopRequireWildcard(require("react"));
var _reactNative = require("react-native");
var _jsxRuntime = require("react/jsx-runtime");
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
// Container with burger menu support
const Container = ({
  burgerMenu,
  open,
  children
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
  style: [styles.container, burgerMenu && open ? styles.containerOpen : styles.containerClosed, burgerMenu && styles.burgerMenu],
  children: children
});

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

// Chat item
exports.BurgerButton = BurgerButton;
const ColorContext = /*#__PURE__*/(0, _react.createContext)(undefined);
const ChatItem = ({
  children
}) => {
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
    style: styles.chatItem,
    children: children
  });
};

// Search container for the chat area
exports.ChatItem = ChatItem;
const SearchContainer = ({
  children
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
  style: styles.searchContainer,
  children: children
});

// Scrollable container
exports.SearchContainer = SearchContainer;
const ScollableContainer = ({
  children
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
  style: styles.scollableContainer,
  children: children
});

// Chat info (name & last message)
exports.ScollableContainer = ScollableContainer;
const ChatInfo = ({
  children
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
  style: styles.chatInfo,
  children: children
});

// Chat name and last message display
exports.ChatInfo = ChatInfo;
const ChatName = ({
  text
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
  style: styles.chatName,
  children: text
});
exports.ChatName = ChatName;
const LastMessage = ({
  children
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
  style: styles.lastMessage,
  children: children
});

// User count display for the chat
exports.LastMessage = LastMessage;
const UserCount = ({
  style,
  text
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
  style: [styles.userCount, style],
  children: text
});
exports.UserCount = UserCount;
const Viewider = () => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
  style: styles.viewider
});
exports.Viewider = Viewider;
const styles = _reactNative.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