"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
  if (from && typeof from === "object" || typeof from === "function") {
    for (let key of __getOwnPropNames(from))
      if (!__hasOwnProp.call(to, key) && key !== except)
        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  }
  return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var styles_exports = {};
__export(styles_exports, {
  PopoverButton: () => PopoverButton,
  PopoverContainer: () => PopoverContainer,
  Wrapper: () => Wrapper
});
module.exports = __toCommonJS(styles_exports);
var import_styled_components = __toESM(require("styled-components"));
const Wrapper = import_styled_components.default.div`
  position: relative;
`;
const popoverContainerPositionModifier = {
  "bottom-start": () => import_styled_components.css`
    bottom: -8px;
    left: 0;
    transform: translate(0, 100%);
  `,
  "bottom-center": () => import_styled_components.css`
    bottom: -8px;
    left: 50%;
    transform: translate(-50%, 100%);
  `,
  "bottom-end": () => import_styled_components.css`
    bottom: -8px;
    right: 0;
    transform: translate(0, 100%);
  `,
  "left-start": () => import_styled_components.css`
    left: -8px;
    top: 0;
    transform: translate(-100%, 0);
  `,
  "left-center": () => import_styled_components.css`
    left: -8px;
    top: 50%;
    transform: translate(-100%, -50%);
  `,
  "left-end": () => import_styled_components.css`
    bottom: 0;
    left: -8px;
    transform: translate(-100%, 0);
  `,
  "top-start": () => import_styled_components.css`
    left: 0;
    top: -8px;
    transform: translate(0, -100%);
  `,
  "top-center": () => import_styled_components.css`
    left: 50%;
    top: -8px;
    transform: translate(-50%, -100%);
  `,
  "top-end": () => import_styled_components.css`
    right: 0;
    top: -8px;
    transform: translate(0, -100%);
  `,
  "right-start": () => import_styled_components.css`
    right: -8px;
    top: 0;
    transform: translate(100%, 0);
  `,
  "right-center": () => import_styled_components.css`
    right: -8px;
    top: 50%;
    transform: translate(100%, -50%);
  `,
  "right-end": () => import_styled_components.css`
    bottom: 0;
    right: -8px;
    transform: translate(100%, 0);
  `
};
const PopoverContainer = import_styled_components.default.div`
  ${({
  theme: {
    yoga: { colors, spacing, radii }
  },
  position,
  width,
  height,
  $zIndex
}) => import_styled_components.css`
    position: absolute;
    overflow: auto;
    width: max-content;
    max-width: ${width}px;
    height: max-content;
    max-height: ${height}px;

    border-radius: ${radii.small}px;
    background-color: ${colors.stamina};
    padding: ${spacing.small}px;
    z-index: ${$zIndex};

    ${popoverContainerPositionModifier[position]};
  `}
`;
const PopoverButton = import_styled_components.default.button.attrs({ type: "button" })`
  all: unset;

  ${({
  theme: {
    yoga: { elevations }
  }
}) => import_styled_components.css`
    @media (hover: hover) and (pointer: fine) {
      &:focus {
        box-shadow: ${elevations.small};
        transition: box-shadow ease 0.5s;
      }
    }
  `}
`;
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
  PopoverButton,
  PopoverContainer,
  Wrapper
});
