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 Chip_exports = {};
__export(Chip_exports, {
  Chip: () => Chip
});
module.exports = __toCommonJS(Chip_exports);
var import_tamagui = require("tamagui"), import_Icon = require("./Icon"), import_Spinner = require("./Spinner"), import_typography = require("./typography");
const ChipContext = (0, import_tamagui.createStyledContext)({
  variant: void 0,
  loading: !1
}), ChipFrame = (0, import_tamagui.styled)(import_tamagui.ThemeableStack, {
  name: "Chip",
  context: ChipContext,
  dsp: "flex",
  ai: "center",
  fd: "row",
  height: 32,
  maxHeight: 32,
  paddingLeft: 16,
  paddingRight: 16,
  flexDirection: "row",
  // @ts-ignore
  pressable: !0,
  minWidth: 48,
  gap: 8,
  justifyContent: "space-between",
  cursor: "pointer",
  hoverStyle: {
    cur: "pointer",
    bc: "$primaryContainer"
  },
  pressStyle: {
    // bc: '$backgroundPress',
  },
  disabledStyle: {
    o: 0.4,
    pe: "none"
  },
  variants: {
    variant: {
      assist: {
        brc: "$outline",
        btc: "$outline",
        bbc: "$outline",
        blc: "$outline",
        borderBlockColor: "$outline",
        borderBlockStartColor: "$outline",
        bw: 1
      },
      filter: {
        bg: "$secondaryContainer"
      },
      input: {
        brc: "$outline",
        btc: "$outline",
        bbc: "$outline",
        blc: "$outline",
        borderBlockColor: "$outline",
        borderBlockStartColor: "$outline",
        bw: 1
      },
      suggestion: {
        brc: "$outline",
        btc: "$outline",
        bbc: "$outline",
        blc: "$outline",
        borderBlockColor: "$outline",
        borderBlockStartColor: "$outline",
        bw: 1
      },
      "success-tonal": {
        brc: "$success",
        btc: "$success",
        bbc: "$success",
        blc: "$success",
        bg: "$successContainer"
      },
      "warning-tonal": {
        brc: "$warning",
        btc: "$warning",
        bbc: "$warning",
        blc: "$warning",
        bg: "$warningContainer"
      },
      "error-tonal": {
        brc: "$error",
        btc: "$error",
        bbc: "$error",
        blc: "$error",
        bg: "$errorContainer"
      }
    },
    pressable: {
      false: {
        pointerEvents: "none",
        cursor: "none",
        hoverStyle: {}
      }
    },
    shape: {
      none: {
        borderRadius: 0
      },
      xs: {
        borderRadius: "$shape.corner_xs"
      },
      sm: {
        borderRadius: "$shape.corner_sm"
      },
      m: {
        borderRadius: "$shape.corner_m"
      },
      l: {
        borderRadius: "$shape.corner_l"
      },
      xl: {
        borderRadius: "$shape.corner_xl"
      },
      full: {
        borderRadius: "$shape.corner_full"
      }
    },
    density: {
      3: {
        height: 48,
        maxHeight: 48,
        paddingLeft: 16,
        paddingRight: 16
      },
      2: {
        height: 40,
        maxHeight: 40,
        paddingLeft: 16,
        paddingRight: 16
      },
      1: {
        height: 36,
        maxHeight: 36,
        paddingLeft: 16,
        paddingRight: 16
      },
      0: {
        height: 32,
        maxHeight: 32,
        paddingLeft: 16,
        paddingRight: 16
      },
      "-1": {
        height: 28,
        maxHeight: 28,
        paddingLeft: 12,
        paddingRight: 12
      },
      "-2": {
        height: 24,
        maxHeight: 24,
        paddingLeft: 8,
        paddingRight: 8
      },
      "-3": {
        height: 20,
        maxHeight: 20,
        paddingLeft: 4,
        paddingRight: 4
      }
    },
    color: {
      primary: {
        backgroundColor: "$primaryContainer"
      },
      secondary: {
        backgroundColor: "$secondaryContainer"
      },
      tertiary: {
        backgroundColor: "$tertiaryContainer"
      }
    }
  },
  defaultVariants: {
    variant: "assist",
    shape: "sm",
    density: "0"
  }
}), ChipText = (0, import_tamagui.styled)(import_typography.Label, {
  name: "ChipText",
  context: ChipContext,
  size: "large",
  hoverStyle: {
    col: "$onSurface"
  },
  cursor: "pointer",
  variants: {
    color: {
      primary: {
        col: "$onPrimaryContainer"
      },
      secondary: {
        col: "$onSecondaryContainer"
      },
      tertiary: {
        col: "$onTertiaryContainer"
      }
    },
    pressable: {
      false: {
        cursor: "none"
      }
    },
    variant: {
      assist: {},
      filter: {
        col: "$onSecondaryContainer"
      },
      input: {},
      suggestion: {},
      "success-tonal": {
        col: "$onSuccessContainer"
      },
      "warning-tonal": {
        color: "$onWarningContainer"
      },
      "error-tonal": {
        col: "$onErrorContainer"
      }
    }
  }
}), ChipIcon = (0, import_tamagui.styled)(import_Icon.Icon, {
  context: ChipContext,
  name: "ButtonIcon",
  width: 18,
  height: 18,
  variants: {
    variant: {
      assist: {},
      filter: {
        col: "$onSecondaryContainer"
      },
      input: {},
      suggestion: {},
      "success-tonal": {
        col: "$onSuccessContainer"
      },
      "warning-tonal": {
        col: "$onWarningContainer"
      },
      "error-tonal": {
        col: "$onErrorContainer"
      }
    },
    color: {
      primary: {
        col: "$onPrimaryContainer"
      },
      secondary: {
        col: "$onSecondaryContainer"
      },
      tertiary: {
        col: "$onTertiaryContainer"
      }
    }
  }
}), ChipSpinner = (0, import_tamagui.styled)(import_Spinner.Spinner, {
  name: "ChipSpinner",
  context: ChipContext,
  variants: {
    loading: {
      false: {
        display: "none"
      }
    },
    color: {
      primary: {
        col: "$onPrimaryContainer"
      },
      secondary: {
        col: "$onSecondaryContainer"
      },
      tertiary: {
        col: "$onTertiaryContainer"
      },
      "success-tonal": {
        col: "$onSuccessContainer"
      },
      "warning-tonal": {
        col: "$onWarningContainer"
      },
      "error-tonal": {
        col: "$onErrorContainer"
      }
    }
  }
}), Chip = (0, import_tamagui.withStaticProperties)(ChipFrame, {
  Props: ChipContext.Provider,
  Text: ChipText,
  Icon: ChipIcon,
  Spinner: ChipSpinner
});
//# sourceMappingURL=Chip.js.map
