"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = _interopRequireWildcard(require("react"));
var _reactNative = require("react-native");
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
const ContainerSlot = ({
  children
}) => {
  const [, setBottomCenterHeight] = (0, _react.useState)(0);
  const [bottomOffset, setBottomOffset] = (0, _react.useState)(0);
  const handleBottomCenterLayout = event => {
    const {
      height
    } = event.nativeEvent.layout;
    setBottomCenterHeight(height);
  };
  return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
    style: styles.container
  }, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
    style: styles.bottomLeft,
    onLayout: event => setBottomOffset(event.nativeEvent.layout.height)
  }, children.bottomLeft), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
    style: styles.bottomRight
  }, children.bottomRight), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
    style: [styles.bottomCenter, {
      bottom: bottomOffset
    }],
    onLayout: handleBottomCenterLayout
  }, children.bottomCenter));
};
const App = () => {
  return /*#__PURE__*/_react.default.createElement(ContainerSlot, null, {
    bottomLeft: /*#__PURE__*/_react.default.createElement(_reactNative.View, {
      style: styles.item
    }, "Bottom Left"),
    bottomRight: /*#__PURE__*/_react.default.createElement(_reactNative.View, {
      style: styles.item
    }, "Bottom Right"),
    bottomCenter: /*#__PURE__*/_react.default.createElement(_reactNative.View, {
      style: styles.item
    }, "Bottom Center")
  });
};
const styles = _reactNative.StyleSheet.create({
  container: {
    position: 'absolute',
    left: 0,
    right: 0,
    bottom: 0
  },
  bottomLeft: {
    position: 'absolute',
    left: 0,
    bottom: 0
  },
  bottomRight: {
    position: 'absolute',
    right: 0,
    bottom: 0
  },
  bottomCenter: {
    position: 'absolute',
    left: '50%',
    transform: [{
      translateX: -50
    }],
    justifyContent: 'center',
    alignItems: 'center'
  },
  item: {
    padding: 10,
    backgroundColor: 'lightblue',
    borderRadius: 5
  }
});
var _default = exports.default = App;
//# sourceMappingURL=demo.js.map