import { Interface } from './Interface.jsx';

// figma node: 8093:9091 Tag (4 variants)
const __venc = (v) => String(v).replace(/[%|=]/g, encodeURIComponent);
const __vkey = (p) => "where=" + __venc(p.where);

export function Tag(_p = {}) {
  const props = { ..._p, showIcon: _p.showIcon ?? false, where: _p.where ?? "on base" };
  const __body0 = () => (
    <div className={props.className} style={{
      width: "fit-content",
      borderRadius: 16,
      backgroundColor: "var(--background-lift)",
      display: "flex",
      flexDirection: "row",
      gap: "calc(var(--spacing-8) * 1px)",
      padding: "4px 8px 4px 8px",
      alignItems: "center",
      flexWrap: "nowrap",
      boxSizing: "border-box",
      paddingLeft: "calc(var(--spacing-8) * 1px)",
      paddingTop: "calc(var(--spacing-4) * 1px)",
      paddingRight: "calc(var(--spacing-8) * 1px)",
      paddingBottom: "calc(var(--spacing-4) * 1px)",
      position: "relative",
      ...props.style,
    }}>
      {props.showIcon && (
      <div style={{
          position: "relative",
          width: 12,
          flexShrink: 0,
          alignSelf: "stretch",
          height: "auto",
        }}>{props.icon1 ?? <Interface property1={"star"} />}</div>
      )}
      <span style={{
        position: "relative",
        fontFamily: "Parkinsans, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
        fontWeight: 500,
        fontSize: 11,
        whiteSpace: "nowrap",
        lineHeight: "12px",
        letterSpacing: "0.750px",
        color: "var(--tone-strong)",
        flexShrink: 0,
        alignSelf: "stretch",
      }}>{props.text1 ?? "Tag title"}</span>
    </div>
  );
  const __body1 = () => (
    <div className={props.className} style={{
      width: "fit-content",
      borderRadius: 16,
      backgroundColor: "var(--background-base-2)",
      display: "flex",
      flexDirection: "row",
      gap: "calc(var(--spacing-8) * 1px)",
      padding: "4px 8px 4px 8px",
      alignItems: "center",
      flexWrap: "nowrap",
      boxSizing: "border-box",
      paddingLeft: "calc(var(--spacing-8) * 1px)",
      paddingTop: "calc(var(--spacing-4) * 1px)",
      paddingRight: "calc(var(--spacing-8) * 1px)",
      paddingBottom: "calc(var(--spacing-4) * 1px)",
      position: "relative",
      ...props.style,
    }}>
      {props.showIcon && (
      <div style={{
          position: "relative",
          width: 12,
          flexShrink: 0,
          alignSelf: "stretch",
          height: "auto",
        }}>{props.icon1 ?? <Interface property1={"star"} />}</div>
      )}
      <span style={{
        position: "relative",
        fontFamily: "Parkinsans, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
        fontWeight: 500,
        fontSize: 11,
        whiteSpace: "nowrap",
        lineHeight: "12px",
        letterSpacing: "0.750px",
        color: "var(--tone-strong)",
        flexShrink: 0,
        alignSelf: "stretch",
      }}>{props.text1 ?? "Tag title"}</span>
    </div>
  );
  const __body2 = () => (
    <div className={props.className} style={{
      width: "fit-content",
      borderRadius: 16,
      backgroundColor: "rgba(246,243,240,0.48)",
      backdropFilter: "blur(16px)",
      display: "flex",
      flexDirection: "row",
      gap: "calc(var(--spacing-8) * 1px)",
      padding: "4px 8px 4px 8px",
      alignItems: "center",
      flexWrap: "nowrap",
      boxSizing: "border-box",
      paddingLeft: "calc(var(--spacing-8) * 1px)",
      paddingTop: "calc(var(--spacing-4) * 1px)",
      paddingRight: "calc(var(--spacing-8) * 1px)",
      paddingBottom: "calc(var(--spacing-4) * 1px)",
      position: "relative",
      ...props.style,
    }}>
      {props.showIcon && (
      <div style={{
          position: "relative",
          width: 12,
          flexShrink: 0,
          alignSelf: "stretch",
          height: "auto",
        }}>{props.icon1 ?? <Interface property1={"star"} />}</div>
      )}
      <span style={{
        position: "relative",
        fontFamily: "Parkinsans, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif",
        fontWeight: 500,
        fontSize: 11,
        whiteSpace: "nowrap",
        lineHeight: "12px",
        letterSpacing: "0.750px",
        color: "var(--tone-strong)",
        flexShrink: 0,
        alignSelf: "stretch",
      }}>{props.text1 ?? "Tag title"}</span>
    </div>
  );
  const __impls = {
    // figma: Where=On Base
    "where=on base": __body0,
    // figma: Where=On Lift
    "where=on lift": __body1,
    // figma: Where=On Depth
    "where=on depth": __body0,
    // figma: Where=On Image
    "where=on image": __body2,
  };
  return (__impls[__vkey(props)] ?? __body0)();
}
export default Tag;
