import { s as k, r as B, K as R, _ as b, t as $, v as O, P as o, J as u, l as I } from "./PrizeCard-C2El3VOB.js";
import * as W from "react";
import { s as _, r as E, t as j, v as D, u as A, a as P, c as F, m as M } from "./Button-DPGn5NZd.js";
import { jsx as g } from "react/jsx-runtime";
function U(e) {
  return k("MuiSheet", e);
}
B("MuiSheet", ["root", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid"]);
const X = ["className", "color", "component", "variant", "invertedColors", "slots", "slotProps"], Y = (e) => {
  const {
    variant: t,
    color: a
  } = e, r = {
    root: ["root", t && `variant${u(t)}`, a && `color${u(a)}`]
  };
  return F(r, U, {});
}, J = _("div", {
  name: "JoySheet",
  slot: "Root",
  overridesResolver: (e, t) => t.root
})(({
  theme: e,
  ownerState: t
}) => {
  var a, r;
  const s = (a = e.variants[t.variant]) == null ? void 0 : a[t.color], {
    borderRadius: n,
    bgcolor: d,
    backgroundColor: c,
    background: p
  } = E({
    theme: e,
    ownerState: t
  }, ["borderRadius", "bgcolor", "backgroundColor", "background"]), i = R(e, `palette.${d}`) || d || R(e, `palette.${c}`) || c || p || (s == null ? void 0 : s.backgroundColor) || (s == null ? void 0 : s.background) || e.vars.palette.background.surface;
  return [b({
    "--Icon-color": t.color !== "neutral" || t.variant === "solid" ? "currentColor" : e.vars.palette.text.icon,
    "--ListItem-stickyBackground": i === "transparent" ? "initial" : i,
    // for sticky List
    "--Sheet-background": i === "transparent" ? "initial" : i
  }, n !== void 0 && {
    "--List-radius": `calc(${n} - var(--variant-borderWidth, 0px))`,
    "--unstable_actionRadius": `calc(${n} - var(--variant-borderWidth, 0px))`
  }, {
    backgroundColor: e.vars.palette.background.surface,
    position: "relative"
  }), b({}, e.typography["body-md"], t.variant === "solid" && t.color && t.invertedColors && j(t.color)(e), t.variant === "soft" && t.color && t.invertedColors && D(t.color)(e), (r = e.variants[t.variant]) == null ? void 0 : r[t.color], s)];
}), V = /* @__PURE__ */ W.forwardRef(function(t, a) {
  const r = A({
    props: t,
    name: "JoySheet"
  }), {
    className: s,
    color: n = "neutral",
    component: d = "div",
    variant: c = "plain",
    invertedColors: p = !1,
    slots: i = {},
    slotProps: y = {}
  } = r, f = $(r, X), v = b({}, r, {
    color: n,
    component: d,
    invertedColors: p,
    variant: c
  }), h = Y(v), C = b({}, f, {
    component: d,
    slots: i,
    slotProps: y
  }), [T, x] = P("root", {
    ref: a,
    className: O(h.root, s),
    elementType: J,
    externalForwardedProps: C,
    ownerState: v
  });
  return /* @__PURE__ */ g(T, b({}, x));
});
process.env.NODE_ENV !== "production" && (V.propTypes = {
  // ┌────────────────────────────── Warning ──────────────────────────────┐
  // │ These PropTypes are generated from the TypeScript type definitions. │
  // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
  // └─────────────────────────────────────────────────────────────────────┘
  /**
   * The content of the component.
   */
  children: o.node,
  /**
   * @ignore
   */
  className: o.string,
  /**
   * The color of the component. It supports those theme colors that make sense for this component.
   * @default 'neutral'
   */
  color: o.oneOfType([o.oneOf(["danger", "neutral", "primary", "success", "warning"]), o.string]),
  /**
   * The component used for the root node.
   * Either a string to use a HTML element or a component.
   */
  component: o.elementType,
  /**
   * If `true`, the children with an implicit color prop invert their colors to match the component's variant and color.
   * @default false
   */
  invertedColors: o.bool,
  /**
   * The props used for each slot inside.
   * @default {}
   */
  slotProps: o.shape({
    root: o.oneOfType([o.func, o.object])
  }),
  /**
   * The components used for each slot inside.
   * @default {}
   */
  slots: o.shape({
    root: o.elementType
  }),
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
  /**
   * The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.
   * @default 'plain'
   */
  variant: o.oneOfType([o.oneOf(["outlined", "plain", "soft", "solid"]), o.string])
});
function K(e) {
  return k("MuiTable", e);
}
B("MuiTable", ["root", "colorPrimary", "colorNeutral", "colorDanger", "colorSuccess", "colorWarning", "colorContext", "variantPlain", "variantOutlined", "variantSoft", "variantSolid", "sizeSm", "sizeMd", "sizeLg", "stickyHeader", "stickyFooter", "noWrap", "hoverRow", "borderAxisNone", "borderAxisX", "borderAxisXBetween", "borderAxisY", "borderAxisYBetween", "borderAxisBoth", "borderAxisBothBetween"]);
const q = ["className", "component", "children", "borderAxis", "hoverRow", "noWrap", "size", "variant", "color", "stripe", "stickyHeader", "stickyFooter", "slots", "slotProps"], G = (e) => {
  const {
    size: t,
    variant: a,
    color: r,
    borderAxis: s,
    stickyHeader: n,
    stickyFooter: d,
    noWrap: c,
    hoverRow: p
  } = e, i = {
    root: ["root", n && "stickyHeader", d && "stickyFooter", c && "noWrap", p && "hoverRow", s && `borderAxis${u(s)}`, a && `variant${u(a)}`, r && `color${u(r)}`, t && `size${u(t)}`]
  };
  return F(i, K, {});
}, l = {
  /**
   * According to https://www.w3.org/TR/2014/REC-html5-20141028/tabular-data.html#the-tr-element,
   * `tr` can only have `td | th` as children, so using :first-of-type is better than :first-child to prevent emotion SSR warning
   */
  getColumnExceptFirst() {
    return "& tr > *:not(:first-of-type), & tr > th + td, & tr > td + th";
  },
  /**
   * Every cell in the table
   */
  getCell() {
    return "& th, & td";
  },
  /**
   * `th` cell of the table (could exist in the body)
   */
  getHeadCell() {
    return "& th";
  },
  /**
   * Only the cell of `thead`
   */
  getHeaderCell() {
    return "& thead th";
  },
  getHeaderCellOfRow(e) {
    return `& thead tr:nth-of-type(${e}) th`;
  },
  getBottomHeaderCell() {
    return "& thead th:not([colspan])";
  },
  getHeaderNestedFirstColumn() {
    return "& thead tr:not(:first-of-type) th:not([colspan]):first-of-type";
  },
  /**
   * The body cell that contains data
   */
  getDataCell() {
    return "& td";
  },
  getDataCellExceptLastRow() {
    return "& tr:not(:last-of-type) > td";
  },
  /**
   * The body cell either `td` or `th`
   */
  getBodyCellExceptLastRow() {
    return `${this.getDataCellExceptLastRow()}, & tr:not(:last-of-type) > th[scope="row"]`;
  },
  getBodyCellOfRow(e) {
    return typeof e == "number" && e < 0 ? `& tbody tr:nth-last-of-type(${Math.abs(e)}) td, & tbody tr:nth-last-of-type(${Math.abs(e)}) th[scope="row"]` : `& tbody tr:nth-of-type(${e}) td, & tbody tr:nth-of-type(${e}) th[scope="row"]`;
  },
  getBodyRow(e) {
    return e === void 0 ? "& tbody tr" : `& tbody tr:nth-of-type(${e})`;
  },
  getFooterCell() {
    return "& tfoot th, & tfoot td";
  },
  getFooterFirstRowCell() {
    return "& tfoot tr:not(:last-of-type) th, & tfoot tr:not(:last-of-type) td";
  }
}, Q = _("table", {
  name: "JoyTable",
  slot: "Root",
  overridesResolver: (e, t) => t.root
})(({
  theme: e,
  ownerState: t
}) => {
  var a, r, s, n, d, c, p;
  const i = (a = e.variants[t.variant]) == null ? void 0 : a[t.color];
  return [b({
    "--Table-headerUnderlineThickness": "2px",
    "--TableCell-borderColor": (r = i == null ? void 0 : i.borderColor) != null ? r : e.vars.palette.divider,
    "--TableCell-headBackground": `var(--Sheet-background, ${e.vars.palette.background.surface})`
  }, t.size === "sm" && {
    "--unstable_TableCell-height": "var(--TableCell-height, 32px)",
    "--TableCell-paddingX": "0.25rem",
    "--TableCell-paddingY": "0.25rem"
  }, t.size === "md" && {
    "--unstable_TableCell-height": "var(--TableCell-height, 40px)",
    "--TableCell-paddingX": "0.5rem",
    "--TableCell-paddingY": "0.375rem"
  }, t.size === "lg" && {
    "--unstable_TableCell-height": "var(--TableCell-height, 48px)",
    "--TableCell-paddingX": "0.75rem",
    "--TableCell-paddingY": "0.5rem"
  }, {
    tableLayout: "fixed",
    width: "100%",
    borderSpacing: "0px",
    borderCollapse: "separate",
    borderRadius: "var(--TableCell-cornerRadius, var(--unstable_actionRadius))"
  }, e.typography[`body-${{
    sm: "xs",
    md: "sm",
    lg: "md"
  }[t.size]}`], (s = e.variants[t.variant]) == null ? void 0 : s[t.color], {
    "& caption": {
      color: e.vars.palette.text.tertiary,
      padding: "calc(2 * var(--TableCell-paddingY)) var(--TableCell-paddingX)"
    },
    [l.getDataCell()]: b({
      padding: "var(--TableCell-paddingY) var(--TableCell-paddingX)",
      height: "var(--unstable_TableCell-height)",
      borderColor: "var(--TableCell-borderColor)",
      // must come after border bottom
      backgroundColor: "var(--TableCell-dataBackground)"
    }, t.noWrap && {
      textOverflow: "ellipsis",
      whiteSpace: "nowrap",
      overflow: "hidden"
    }),
    [l.getHeadCell()]: {
      textAlign: "left",
      padding: "var(--TableCell-paddingY) var(--TableCell-paddingX)",
      backgroundColor: "var(--TableCell-headBackground)",
      // use `background-color` in case the Sheet has gradient background
      height: "var(--unstable_TableCell-height)",
      fontWeight: e.vars.fontWeight.lg,
      borderColor: "var(--TableCell-borderColor)",
      color: e.vars.palette.text.secondary,
      textOverflow: "ellipsis",
      whiteSpace: "nowrap",
      overflow: "hidden"
    },
    [l.getHeaderCell()]: {
      verticalAlign: "bottom",
      // Automatic radius adjustment with Sheet
      "&:first-of-type": {
        borderTopLeftRadius: "var(--TableCell-cornerRadius, var(--unstable_actionRadius))"
      },
      "&:last-of-type": {
        borderTopRightRadius: "var(--TableCell-cornerRadius, var(--unstable_actionRadius))"
      }
    },
    "& tfoot tr > *": {
      backgroundColor: `var(--TableCell-footBackground, ${e.vars.palette.background.level1})`,
      // Automatic radius adjustment with Sheet
      "&:first-of-type": {
        borderBottomLeftRadius: "var(--TableCell-cornerRadius, var(--unstable_actionRadius))"
      },
      "&:last-of-type": {
        borderBottomRightRadius: "var(--TableCell-cornerRadius, var(--unstable_actionRadius))"
      }
    }
  }), (((n = t.borderAxis) == null ? void 0 : n.startsWith("x")) || ((d = t.borderAxis) == null ? void 0 : d.startsWith("both"))) && {
    // insert border between rows
    [l.getHeaderCell()]: {
      borderBottomWidth: 1,
      borderBottomStyle: "solid"
    },
    [l.getBottomHeaderCell()]: {
      borderBottomWidth: "var(--Table-headerUnderlineThickness)",
      borderBottomStyle: "solid"
    },
    [l.getBodyCellExceptLastRow()]: {
      borderBottomWidth: 1,
      borderBottomStyle: "solid"
    },
    [l.getFooterCell()]: {
      borderTopWidth: 1,
      borderTopStyle: "solid"
    }
  }, (((c = t.borderAxis) == null ? void 0 : c.startsWith("y")) || ((p = t.borderAxis) == null ? void 0 : p.startsWith("both"))) && {
    // insert border between columns
    [`${l.getColumnExceptFirst()}, ${l.getHeaderNestedFirstColumn()}`]: {
      borderLeftWidth: 1,
      borderLeftStyle: "solid"
    }
  }, (t.borderAxis === "x" || t.borderAxis === "both") && {
    // insert border at the top of header and bottom of body
    [l.getHeaderCellOfRow(1)]: {
      borderTopWidth: 1,
      borderTopStyle: "solid"
    },
    [l.getBodyCellOfRow(-1)]: {
      borderBottomWidth: 1,
      borderBottomStyle: "solid"
    },
    [l.getFooterCell()]: {
      borderBottomWidth: 1,
      borderBottomStyle: "solid"
    }
  }, (t.borderAxis === "y" || t.borderAxis === "both") && {
    // insert border on the left of first column and right of the last column
    "& tr > *:first-of-type": {
      borderLeftWidth: 1,
      borderLeftStyle: "solid"
    },
    "& tr > *:last-of-type:not(:first-of-type)": {
      borderRightWidth: 1,
      borderRightStyle: "solid"
    }
  }, t.stripe && {
    [l.getBodyRow(t.stripe)]: {
      // For customization, a table cell can look for this variable with a fallback value.
      background: `var(--TableRow-stripeBackground, ${e.vars.palette.background.level2})`,
      color: e.vars.palette.text.primary
    }
  }, t.hoverRow && {
    [l.getBodyRow()]: {
      "&:hover": {
        background: `var(--TableRow-hoverBackground, ${e.vars.palette.background.level3})`
      }
    }
  }, t.stickyHeader && {
    // The column header
    [l.getHeaderCell()]: {
      position: "sticky",
      top: 0,
      zIndex: e.vars.zIndex.table
    },
    [l.getHeaderCellOfRow(2)]: {
      // support upto 2 rows for the sticky header
      top: "var(--unstable_TableCell-height)"
    }
  }, t.stickyFooter && {
    // The column header
    [l.getFooterCell()]: {
      position: "sticky",
      bottom: 0,
      zIndex: e.vars.zIndex.table,
      color: e.vars.palette.text.secondary,
      fontWeight: e.vars.fontWeight.lg
    },
    [l.getFooterFirstRowCell()]: {
      // support upto 2 rows for the sticky footer
      bottom: "var(--unstable_TableCell-height)"
    }
  }];
}), Z = /* @__PURE__ */ W.forwardRef(function(t, a) {
  const r = A({
    props: t,
    name: "JoyTable"
  }), {
    className: s,
    component: n,
    children: d,
    borderAxis: c = "xBetween",
    hoverRow: p = !1,
    noWrap: i = !1,
    size: y = "md",
    variant: f = "plain",
    color: v = "neutral",
    stripe: h,
    stickyHeader: C = !1,
    stickyFooter: T = !1,
    slots: x = {},
    slotProps: H = {}
  } = r, z = $(r, q), m = b({}, r, {
    borderAxis: c,
    hoverRow: p,
    noWrap: i,
    component: n,
    size: y,
    color: v,
    variant: f,
    stripe: h,
    stickyHeader: C,
    stickyFooter: T
  }), N = G(m), L = b({}, z, {
    component: n,
    slots: x,
    slotProps: H
  }), [w, S] = P("root", {
    ref: a,
    className: O(N.root, s),
    elementType: Q,
    externalForwardedProps: L,
    ownerState: m
  });
  return /* @__PURE__ */ g(M.Provider, {
    value: !0,
    children: /* @__PURE__ */ g(w, b({}, S, {
      children: d
    }))
  });
});
process.env.NODE_ENV !== "production" && (Z.propTypes = {
  // ┌────────────────────────────── Warning ──────────────────────────────┐
  // │ These PropTypes are generated from the TypeScript type definitions. │
  // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
  // └─────────────────────────────────────────────────────────────────────┘
  /**
   * The axis to display a border on the table cell.
   * @default 'xBetween'
   */
  borderAxis: o.oneOfType([o.oneOf(["both", "bothBetween", "none", "x", "xBetween", "y", "yBetween"]), o.string]),
  /**
   * Children of the table
   */
  children: o.node,
  /**
   * @ignore
   */
  className: o.string,
  /**
   * The color of the component. It supports those theme colors that make sense for this component.
   * @default 'neutral'
   */
  color: o.oneOfType([o.oneOf(["danger", "neutral", "primary", "success", "warning"]), o.string]),
  /**
   * The component used for the root node.
   * Either a string to use a HTML element or a component.
   */
  component: o.elementType,
  /**
   * If `true`, the table row will shade on hover.
   * @default false
   */
  hoverRow: o.bool,
  /**
   * If `true`, the body cells will not wrap, but instead will truncate with a text overflow ellipsis.
   *
   * Note: Header cells are always truncated with overflow ellipsis.
   *
   * @default false
   */
  noWrap: o.bool,
  /**
   * The size of the component.
   * It accepts theme values between 'sm' and 'lg'.
   * @default 'md'
   */
  size: o.oneOfType([o.oneOf(["sm", "md", "lg"]), o.string]),
  /**
   * The props used for each slot inside.
   * @default {}
   */
  slotProps: o.shape({
    root: o.oneOfType([o.func, o.object])
  }),
  /**
   * The components used for each slot inside.
   * @default {}
   */
  slots: o.shape({
    root: o.elementType
  }),
  /**
   * If `true`, the footer always appear at the bottom of the overflow table.
   *
   * ⚠️ It doesn't work with IE11.
   * @default false
   */
  stickyFooter: o.bool,
  /**
   * If `true`, the header always appear at the top of the overflow table.
   *
   * ⚠️ It doesn't work with IE11.
   * @default false
   */
  stickyHeader: o.bool,
  /**
   * The odd or even row of the table body will have subtle background color.
   */
  stripe: o.oneOfType([o.oneOf(["odd", "even"]), o.string]),
  /**
   * The system prop that allows defining system overrides as well as additional CSS styles.
   */
  sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object]),
  /**
   * The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.
   * @default 'plain'
   */
  variant: o.oneOfType([o.oneOf(["outlined", "plain", "soft", "solid"]), o.string])
});
const ro = I(/* @__PURE__ */ g("path", {
  d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4m0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4"
}), "Person");
export {
  ro as P,
  V as S,
  Z as T
};
