"use strict";
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: 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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var Button_theme_exports = {};
__export(Button_theme_exports, {
  default: () => Button_theme_default
});
module.exports = __toCommonJS(Button_theme_exports);
var import_yoga_common = require("@gympass/yoga-common");
const Button = ({
  spacing,
  fontSizes,
  borders,
  radii,
  colors,
  fontWeights,
  lineHeights
}) => ({
  padding: {
    default: {
      right: spacing.large,
      left: spacing.large
    },
    small: {
      right: spacing.small,
      left: spacing.small
    }
  },
  height: {
    default: 48,
    small: 32
  },
  font: {
    size: {
      default: fontSizes.medium,
      small: fontSizes.small
    },
    weight: fontWeights.medium,
    lineHeight: {
      default: lineHeights.medium,
      small: lineHeights.xsmall
    }
  },
  border: {
    radius: radii.circle
  },
  icon: {
    size: {
      default: 24,
      small: 16
    },
    margin: {
      right: spacing.xxsmall
    }
  },
  types: {
    contained: {
      backgroundColor: {
        disabled: colors.elements.backgroundAndDisabled,
        primary: {
          default: colors.primary,
          pressed: (0, import_yoga_common.hexToRgb)(colors.primary, 0.75)
        },
        secondary: {
          default: colors.secondary,
          pressed: (0, import_yoga_common.hexToRgb)(colors.secondary, 0.75)
        }
      },
      font: {
        default: {
          color: colors.white
        },
        disabled: {
          color: colors.text.disabled
        },
        pressed: {
          color: colors.white
        }
      }
    },
    outline: {
      backgroundColor: {
        default: "transparent",
        primary: {
          hover: colors.primary
        },
        secondary: {
          hover: colors.secondary
        }
      },
      border: {
        width: borders.small,
        color: {
          disabled: colors.elements.backgroundAndDisabled
        }
      },
      font: {
        default: {
          primary: {
            color: colors.primary
          },
          secondary: {
            color: colors.secondary
          }
        },
        disabled: {
          color: colors.text.disabled
        },
        inverted: {
          color: colors.text.primary
        },
        hover: {
          color: colors.white
        },
        pressed: {
          primary: {
            color: (0, import_yoga_common.hexToRgb)(colors.primary, 0.75)
          },
          secondary: {
            color: (0, import_yoga_common.hexToRgb)(colors.secondary, 0.75)
          }
        }
      }
    },
    text: {
      backgroundColor: "transparent",
      disabled: colors.text.disabled
    },
    link: {
      font: {
        primary: {
          color: colors.primary
        },
        secondary: {
          color: colors.secondary
        },
        disabled: {
          color: colors.text.disabled
        }
      },
      margin: {
        top: spacing.small,
        bottom: spacing.xxsmall
      },
      icon: {
        margin: {
          right: spacing.xxxsmall
        }
      }
    }
  }
});
var Button_theme_default = Button;
