var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: !0 });
}, __copyProps = (to, from, except, desc) => {
  if (from && typeof from == "object" || typeof from == "function")
    for (let key of __getOwnPropNames(from))
      !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
var SideSheet_exports = {};
__export(SideSheet_exports, {
  SideSheet: () => SideSheet
});
module.exports = __toCommonJS(SideSheet_exports);
var import_jsx_runtime = require("react/jsx-runtime"), import_react = require("react"), import_react_native = require("react-native"), import_tamagui = require("tamagui"), import_Dialog = require("./Dialog"), import_Divider = require("./Divider");
function SideSheet(param) {
  var { open, onOpenChange, children, title, Action, width = 400, ...props } = param, theme = (0, import_tamagui.useThemeName)();
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Dialog.Dialog, {
    open,
    onOpenChange,
    children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_Dialog.Dialog.Portal, {
      children: [
        /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Dialog.Dialog.Overlay, {}, "overlay"),
        /* @__PURE__ */ (0, import_react.createElement)(Container, {
          ...props,
          theme,
          width,
          key: "sheet-container",
          enterStyle: {
            x: width
          },
          exitStyle: {
            x: width
          }
        }, /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.YStack, {
          pt: 24,
          pl: 16,
          pr: 24,
          h: "100%",
          gap: 8,
          fg: 1,
          children: [
            /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.ScrollView, {
              showsVerticalScrollIndicator: !1,
              children
            }),
            /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.View, {
              fg: 1
            }),
            Action && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tamagui.View, {
              ml: -16,
              mr: -24,
              children: [
                /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Divider.Divider, {
                  w: "100%",
                  mb: 4
                }),
                /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tamagui.XStack, {
                  bottom: 0,
                  justifyContent: "flex-end",
                  px: 24,
                  py: 16,
                  children: Action
                })
              ]
            })
          ]
        }))
      ]
    }, "portal")
  });
}
var { height: HEIGHT } = import_react_native.Dimensions.get("window"), Container = (0, import_tamagui.styled)(import_tamagui.Dialog.Content, {
  name: "SideSheetContainer",
  elevate: !0,
  animateOnly: [
    "width"
  ],
  bblr: "$shape.corner_l",
  btlr: "$shape.corner_l",
  btrr: 0,
  bbrr: 0,
  style: {
    position: "fixed"
  },
  right: 0,
  top: 0,
  height: HEIGHT,
  maxHeight: HEIGHT,
  backgroundColor: "$surface",
  animation: "medium",
  overflow: "hidden",
  enterStyle: {
    x: 400
  },
  exitStyle: {
    x: 800
  }
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  SideSheet
});
//# sourceMappingURL=SideSheet.js.map
