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 IconButton_exports = {};
__export(IconButton_exports, {
  IconButton: () => IconButton
});
module.exports = __toCommonJS(IconButton_exports);
var import_tamagui = require("tamagui"), import_Icon = require("./Icon"), import_Spinner = require("./Spinner");
const IconButtonContext = (0, import_tamagui.createStyledContext)({
  variant: "",
  loading: !1,
  disabled: !1,
  density: "0"
}), IconButtonFrame = (0, import_tamagui.styled)(import_tamagui.View, {
  name: "IconButton",
  context: IconButtonContext,
  alignItems: "center",
  justifyContent: "center",
  flexDirection: "column",
  width: 40,
  height: 40,
  borderRadius: 100,
  hoverStyle: {
    cur: "pointer",
    bc: "$primaryContainer"
  },
  disabledStyle: {
    o: 0.4,
    pointerEvents: "none",
    cursor: "none"
  },
  variants: {
    variant: {
      filled: {
        backgroundColor: "$primary"
      },
      elevated: {
        backgroundColor: "$surfaceContainerLow"
      },
      "filled-tonal": {
        bg: "$secondaryContainer"
      },
      "filled-success": {
        bg: "$successContainer"
      },
      "filled-tertiary": {
        bg: "$tertiaryContainer"
      },
      "filled-error": {
        bg: "$errorContainer"
      },
      "tonal-warning": {
        bg: "$warningContainer"
      },
      outlined: {
        bc: "transparent",
        brc: "$outline",
        btc: "$outline",
        bbc: "$outline",
        blc: "$outline",
        bw: 1.5,
        borderBlockColor: "$outline",
        borderBlockStartColor: "$outline"
      },
      standard: {
        bg: "transparent"
      }
    },
    density: {
      0: {},
      "-1": {
        width: 36,
        height: 36
      },
      "-2": {
        width: 32,
        height: 32
      },
      "-3": {
        width: 28,
        height: 28
      }
    },
    disabled: {
      true: {
        pointerEvents: "none",
        cursor: "none"
      }
    },
    loading: {
      true: {},
      false: {}
    }
  },
  defaultVariants: {
    variant: "filled",
    disabled: !1,
    density: "0"
  }
}), IconButtonSpinner = (0, import_tamagui.styled)(import_Spinner.Spinner, {
  name: "ButtonSpinner",
  context: IconButtonContext,
  col: "$onPrimary",
  variants: {
    loading: {
      false: {
        display: "none"
      }
    },
    variant: {
      filled: {
        col: "$onPrimary"
      },
      elevated: {
        col: "$primary"
      },
      "filled-tonal": {
        col: "$onSecondaryContainer"
      },
      "filled-tertiary": {
        col: "$onTertiaryContainer"
      },
      "filled-success": {
        col: "$onSuccessContainer"
      },
      "filled-error": {
        col: "$onErrorContainer"
      },
      "tonal-warning": {
        col: "$onWarningContainer"
      }
    }
  }
}), IconButtonIcon = (0, import_tamagui.styled)(import_Icon.Icon, {
  name: "IconButtonIcon",
  context: IconButtonContext,
  size: 24,
  variants: {
    variant: {
      filled: {
        col: "$onPrimary"
      },
      "filled-tonal": {
        col: "$onSecondaryContainer"
      },
      "filled-tertiary": {
        col: "$onTertiaryContainer"
      },
      tonal: {
        col: "$onSecondaryContainer"
      },
      "tonal-success": {
        col: "$onSuccessContainer"
      },
      "tonal-warning": {
        col: "$onWarningContainer"
      },
      elevated: {
        col: "$primary"
      }
    },
    density: {
      0: {},
      "-1": {
        // @ts-ignore
        size: 20
      },
      "-2": {
        // @ts-ignore
        size: 16
      },
      "-3": {
        // @ts-ignore
        size: 16
      }
    },
    loading: {
      true: {
        display: "none"
      }
    }
  }
}), IconButton = (0, import_tamagui.withStaticProperties)(IconButtonFrame, {
  Props: IconButtonContext.Provider,
  Icon: IconButtonIcon,
  Spinner: IconButtonSpinner
});
//# sourceMappingURL=IconButton.js.map
