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 Menu_exports = {};
__export(Menu_exports, {
  Menu: () => Menu,
  MenuItem: () => MenuItem
});
module.exports = __toCommonJS(Menu_exports);
var import_icons_ui = require("@truststack/icons-ui"), import_tamagui = require("tamagui"), import_Icon = require("./Icon"), import_Spinner = require("./Spinner"), import_typography = require("./typography"), Frame = (0, import_tamagui.styled)(import_tamagui.ThemeableStack, {
  name: "MenuFrame",
  shadowColor: "$shadow_opacity",
  shadowRadius: "$shadow.2",
  borderRadius: "$shape.corner_xs",
  "$platform-native": {
    backgroundColor: "transparent"
  },
  "$platform-web": {
    backgroundColor: "$surfaceContainerLowest"
  },
  minWidth: 112,
  flexDirection: "column",
  cursor: "pointer",
  variants: {
    fluid: {
      true: {},
      false: {
        maxWidth: 280
      }
    }
  }
}), ItemContext = (0, import_tamagui.createStyledContext)({
  selected: !1,
  variant: void 0,
  loading: !1
}), ItemFrame = (0, import_tamagui.styled)(import_tamagui.Stack, {
  context: ItemContext,
  name: "MenuItem",
  height: 48,
  width: "100%",
  minWidth: 112,
  flexDirection: "row",
  alignItems: "center",
  cursor: "pointer",
  "$platform-native": {
    backgroundColor: "transparent"
  },
  "$platform-web": {
    backgroundColor: "$surfaceContainerLowest"
  },
  hoverStyle: {
    backgroundColor: "$primaryContainer"
  },
  pos: "relative",
  variants: {
    selected: {
      true: {
        backgroundColor: "$secondaryContainer"
      }
    },
    variant: {
      "filled-tonal": {
        backgroundColor: "$secondaryContainer"
      },
      "filled-error": {
        backgroundColor: "$errorContainer",
        "$platform-web": {
          backgroundColor: "$errorContainer"
        }
      },
      "tonal-success": {
        bg: "$successContainer"
      }
    },
    loading: {
      true: {},
      false: {}
    }
  }
}), MenuLabel = (0, import_tamagui.styled)(import_typography.Label, {
  size: "large",
  context: ItemContext,
  col: "$onSurface",
  px: 12,
  hoverStyle: {
    col: "$onSurface"
  },
  $compact: {
    size: "large"
  },
  variants: {
    selected: {
      true: {
        col: "$onSecondaryContainer"
      }
    },
    variant: {
      "filled-tonal": {
        col: "$onSecondaryContainer"
      },
      "filled-error": {
        col: "$onErrorContainer"
      },
      "tonal-success": {
        col: "$onSuccessContainer"
      }
    }
  }
}), Selected = (0, import_tamagui.styled)(import_Icon.Icon, {
  name: "MenuSelected",
  context: ItemContext,
  Icon: import_icons_ui.Check,
  ContainerProps: {
    display: "none",
    col: "$onSecondaryContainer",
    width: 24,
    height: 24,
    top: 48 / 2 - 12,
    right: 8,
    pos: "absolute"
  },
  variants: {
    selected: {
      true: {
        ContainerProps: {
          display: "block",
          col: "$onSecondaryContainer",
          width: 24,
          height: 24,
          top: 48 / 2 - 12,
          right: 8,
          pos: "absolute"
        }
      }
    }
  }
}), MenuLeadingIcon = (0, import_tamagui.styled)(import_Icon.Icon, {
  name: "MenuIcon",
  context: ItemContext,
  size: 20,
  col: "$onSurfaceVariant",
  ContainerProps: {
    display: "flex",
    flexDirection: "column",
    justifyContent: "center",
    alignItems: "center",
    marginLeft: 12,
    marginRight: 6
  },
  variants: {
    variant: {
      "filled-tonal": {
        col: "$onSecondaryContainer"
      },
      "filled-error": {
        col: "$onErrorContainer"
      },
      "tonal-success": {
        col: "$onSuccessContainer"
      }
    }
  }
}), MenuSpinner = (0, import_tamagui.styled)(import_Spinner.Spinner, {
  name: "MenuSpinner",
  context: ItemContext,
  marginRight: 12,
  variants: {
    loading: {
      false: {
        display: "none"
      }
    },
    variant: {
      filled: {
        col: "$onPrimary"
      },
      "filled-error": {
        col: "$onError"
      }
    }
  }
}), MenuItem = (0, import_tamagui.withStaticProperties)(ItemFrame, {
  Props: ItemContext.Provider,
  Label: MenuLabel,
  LeadingIcon: MenuLeadingIcon,
  Selected,
  Spinner: MenuSpinner
}), Menu = (0, import_tamagui.withStaticProperties)(Frame, {});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  Menu,
  MenuItem
});
//# sourceMappingURL=Menu.js.map
