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 NavDrawer_exports = {};
__export(NavDrawer_exports, {
  NavDrawer: () => NavDrawer,
  NavDrawerItem: () => NavDrawerItem,
  NavDrawerModel: () => NavDrawerModel
});
module.exports = __toCommonJS(NavDrawer_exports);
var import_jsx_runtime = require("react/jsx-runtime"), import_react_native = require("react-native"), import_tamagui = require("tamagui"), import_Divider = require("./Divider"), import_Icon = require("./Icon"), import_typography = require("./typography"), import_utils = require("./utils"), NavDrawerContext = (0, import_tamagui.createStyledContext)({
  variant: "standard"
}), Frame = (0, import_tamagui.styled)(import_tamagui.View, {
  name: "NavDrawerFrame",
  context: NavDrawerContext,
  height: "100%",
  backgroundColor: "$surfaceContainerLow",
  borderTopRightRadius: "$shape.corner_l",
  borderBottomRightRadius: "$shape.corner_l",
  minWidth: 240,
  maxWidth: 360,
  paddingLeft: 12,
  paddingRight: 12,
  variants: {
    variant: {
      standard: {
        backgroundColor: "transparent"
      },
      outlined: {
        backgroundColor: "$surfaceContainerLowest",
        borderRightColor: "$outlineVariant",
        borderRightWidth: "$border.outline"
      }
    },
    shape: {
      none: {
        borderRadius: 0
      }
    }
  }
}), Content = (0, import_tamagui.styled)(import_tamagui.ThemeableStack, {
  name: "NavDrawerContent",
  context: NavDrawerContext,
  minWidth: 240,
  maxWidth: 360,
  height: "100%"
}), Headline = (0, import_tamagui.styled)(import_typography.Title, {
  name: "NavDrawerHeadline",
  size: "small",
  context: NavDrawerContext,
  height: 56,
  display: "flex",
  flexDirection: "row",
  alignItems: "center",
  paddingLeft: 16
}), Divider = (0, import_tamagui.styled)(import_Divider.Divider, {
  name: "NavDrawerDivider",
  context: NavDrawerContext,
  mt: 16,
  mb: 16
}), NavDrawerItemContext = (0, import_tamagui.createStyledContext)({
  active: !1
}), NavDrawerItemFrame = (0, import_tamagui.styled)(import_tamagui.ThemeableStack, {
  name: "NavDrawerItem",
  context: NavDrawerItemContext,
  flexDirection: "row",
  alignItems: "center",
  height: 56,
  width: "100%",
  paddingLeft: 16,
  borderRadius: "$shape.corner_xl",
  cursor: "pointer",
  variants: {
    active: {
      true: {
        backgroundColor: "$secondaryContainer"
      },
      false: {
        hoverStyle: {
          backgroundColor: (0, import_utils.rgbToRgba)("$onSecondaryContainer", 0.08)
        }
      }
    }
  },
  defaultVariants: {
    active: !1
  }
}), NavItemFramePressable = NavDrawerItemFrame.styleable(function(param, ref) {
  var { onPress, ...props } = param;
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react_native.Pressable, {
    disabled: props.disabled,
    onPress,
    children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(NavDrawerItemFrame, {
      ...props,
      ref
    })
  });
}), Icon = (0, import_tamagui.styled)(import_Icon.Icon, {
  name: "NavItemIcon",
  context: NavDrawerItemContext,
  size: 24,
  marginRight: 12,
  variants: {
    active: {
      true: {
        col: "$onSecondaryContainer"
      },
      false: {
        col: "$onSurfaceVariant"
      }
    }
  }
}), Label = (0, import_tamagui.styled)(import_typography.Label, {
  name: "NavDrawerLabel",
  context: NavDrawerItemContext,
  size: "large",
  col: "$onSurfaceVariant",
  variants: {
    active: {
      true: {
        col: "$onSecondaryContainer"
      }
    },
    trailing: {
      true: {
        marginLeft: "auto",
        marginRight: 24
      }
    }
  }
}), Spacer = (0, import_tamagui.styled)(import_tamagui.View, {
  name: "NavDrawerSpacer",
  height: 56
}), NavDrawerItem = (0, import_tamagui.withStaticProperties)(NavItemFramePressable, {
  Props: NavDrawerItemContext.Provider,
  Label,
  Icon
}), NavDrawer = (0, import_tamagui.withStaticProperties)(Frame, {
  Props: NavDrawerContext.Provider,
  Content,
  Headline,
  Divider,
  Spacer
}), { height: HEIGHT } = import_react_native.Dimensions.get("window"), ModelContent = (0, import_tamagui.styled)(import_tamagui.Dialog.Content, {
  name: "NavDrawerModelContent",
  elevate: !0,
  height: HEIGHT,
  maxHeight: HEIGHT,
  animation: "medium",
  overflow: "hidden",
  enterStyle: {
    y: 0,
    opacity: 0
  },
  exitStyle: {
    y: 0,
    opacity: 0
  },
  padding: 0,
  borderRadius: 0
}), NavDrawerModel = (0, import_tamagui.withStaticProperties)(import_tamagui.Dialog, {
  Overlay: import_tamagui.Dialog.Overlay,
  Portal: import_tamagui.Dialog.Portal,
  Content: ModelContent
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  NavDrawer,
  NavDrawerItem,
  NavDrawerModel
});
//# sourceMappingURL=NavDrawer.js.map
