"use strict";

import React, { useContext } from 'react';
import { View } from 'react-native';
import styles from "./styles.js";
import { GridContext } from "../Context/index.js";
import { jsx as _jsx } from "react/jsx-runtime";
const Item = ({
  widthSpan,
  heightSpan,
  children,
  style
}) => {
  const grid = useContext(GridContext);
  return /*#__PURE__*/_jsx(View, {
    style: [style, styles.item, {
      width: grid.getSizeSpan(widthSpan ?? grid.numberOfColumns),
      height: heightSpan ? grid.getSizeSpan(heightSpan) : undefined
    }],
    children: children
  });
};
export default Item;
//# sourceMappingURL=Item.js.map