"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
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 __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
  // If the importer is in node compatibility mode or this is not an ESM
  // file that has been converted to a CommonJS file using a Babel-
  // compatible transform (i.e. "__esModule" has not been set), then set
  // "default" to the CommonJS "module.exports" for node compatibility.
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
  mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var CardButton_exports = {};
__export(CardButton_exports, {
  CardButton: () => CardButton
});
module.exports = __toCommonJS(CardButton_exports);
var import_react = __toESM(require("react"));
var import_libs = require("../../libs");
var import_styled_components = __toESM(require("styled-components"));
const Button = import_styled_components.default.button`
  ${(0, import_libs.withTokens)(
  "colors-content-default-default",
  "colors-surface-transparent-hover",
  "colors-surface-transparent-pressed",
  "colors-border-light-default",
  "colors-opacity-default-10",
  "colors-border-subdued-default-hover",
  "colors-border-subdued-default-pressed",
  "colors-border-focus-default",
  "radius-s",
  "border-width-default",
  "border-width-focus",
  "spacing-xs"
)}

  display: flex;
  padding: var(--spacing-xs);
  flex-grow: 1;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;

  background-color: transparent;
  color: var(--colors-content-default-default);
  font-weight: 600;

  border-width: var(--border-width-default);
  border-radius: var(--radius-s);
  border-color: ${({ theme: { theme } }) => theme === "light" ? "var(--colors-border-light-default);" : "var(--colors-opacity-default-10);"}

  &:hover {
    background-color: var(--colors-surface-transparent-hover);
    ${({ theme: { theme } }) => theme === "light" && "border-color: var(--colors-border-subdued-default-hover);"}
  }

  &:active {
    background-color: var(--colors-surface-transparent-pressed);
    ${({ theme: { theme } }) => theme === "light" && "border-color: var(--colors-border-subdued-default-pressed);"}
  }

  &:focus-visible {
    border-color: var(--colors-border-focus-default);
    border-width: var(--border-width-focus);
  }
`;
const CardButton = ({
  onClick,
  title,
  iconRight,
  variant = "default"
}) => {
  return /* @__PURE__ */ import_react.default.createElement(Button, { onClick, style: { borderStyle: variant === "default" ? "solid" : "dashed" } }, title, " ", iconRight);
};
//# sourceMappingURL=CardButton.js.map
