{
  "version": 3,
  "sources": ["ssg:https://asset.29cm.co.kr/contents/framer/components/@shared/TextButton/TextButton.js"],
  "sourcesContent": ["import { jsxs, jsx } from \"react/jsx-runtime\";\nimport { forwardRef } from \"react\";\nimport { Icon } from \"../Icon/Icon.js\";\nimport { typography } from \"../../../styles/typography.js\";\nconst TextButton = ({\n  children,\n  style,\n  as,\n  theme = \"light\",\n  size = \"medium\",\n  prefixIcon,\n  postfixIcon,\n  variant,\n  backgroundColor,\n  color,\n  isUnderlined = false,\n  ...rest\n}, ref) => {\n  const Component = as ?? \"button\";\n  const variantStyle = textButtonStyleByVariant[rest.disabled ? \"disabled\" : variant];\n  const textButtonStyle = {\n    ...style,\n    ...baseTextButtonStyle,\n    ...textButtonStyleBySize[size],\n    ...variantStyle[theme],\n    ...isUnderlined && {\n      textDecoration: \"underline\"\n    }\n  };\n  const reshapedProps = {\n    ...rest,\n    href: rest.disabled ? void 0 : rest.href,\n    onClick: rest.disabled ? void 0 : rest.onClick\n  };\n  return /* @__PURE__ */ jsxs(Component, { ref, ...reshapedProps, style: textButtonStyle, children: [\n    prefixIcon ? /* @__PURE__ */ jsx(Icon, { type: getIconType(prefixIcon), fill: getIconFill(prefixIcon), size: iconSizeByButtonSize[size], color: textButtonStyle.color, weight: \"bold\" }) : null,\n    /* @__PURE__ */ jsx(\"div\", { style: contentStyle, children }),\n    postfixIcon ? /* @__PURE__ */ jsx(Icon, { type: getIconType(postfixIcon), fill: getIconFill(postfixIcon), size: iconSizeByButtonSize[size], color: textButtonStyle.color, weight: \"bold\" }) : null\n  ] });\n};\nconst getIconType = (icon) => typeof icon === \"string\" ? icon : icon.type;\nconst getIconFill = (icon) => typeof icon === \"string\" ? void 0 : icon.fill;\nconst baseTextButtonStyle = {\n  minWidth: \"fit-content\",\n  height: \"auto\",\n  display: \"flex\",\n  alignItems: \"center\",\n  justifyContent: \"center\",\n  cursor: \"pointer\",\n  // reset button element css\n  backgroundColor: \"transparent\",\n  textDecoration: \"none\",\n  padding: 0,\n  outline: \"none\",\n  border: \"none\",\n  boxSizing: \"border-box\"\n};\nconst textButtonStyleBySize = {\n  large: {\n    gap: \"4px\",\n    ...typography(18, 600, 1.2)\n  },\n  medium: {\n    gap: \"4px\",\n    ...typography(16, 600, 1.2)\n  },\n  small: {\n    gap: \"2px\",\n    ...typography(14, 600, 1.2)\n  },\n  xSmall: {\n    gap: \"2px\",\n    ...typography(12, 700, 1.36)\n  }\n};\nconst textButtonStyleByVariant = {\n  primary: {\n    light: {\n      color: \"#000\"\n    },\n    dark: {\n      color: \"#fff\"\n    }\n  },\n  secondary: {\n    light: {\n      color: \"#474747\"\n    },\n    dark: {\n      color: \"#a0a0a0\"\n    }\n  },\n  tertiary: {\n    light: {\n      color: \"#a0a0a0\"\n    },\n    dark: {\n      color: \"#474747\"\n    }\n  },\n  disabled: {\n    light: {\n      color: \"#c4c4c4\",\n      cursor: \"not-allowed\"\n    },\n    dark: {\n      color: \"#303033\",\n      cursor: \"not-allowed\"\n    }\n  }\n};\nconst iconSizeByButtonSize = {\n  large: 20,\n  medium: 18,\n  small: 16,\n  xSmall: 12\n};\nconst contentStyle = {\n  display: \"flex\",\n  alignItems: \"center\"\n};\nconst Default = forwardRef(TextButton);\nexport {\n  Default as TextButton\n};\n"],
  "mappings": "wGAIA,IAAMA,EAAa,CAAC,CAClB,SAAAC,EACA,MAAAC,EACA,GAAAC,EACA,MAAAC,EAAQ,QACR,KAAAC,EAAO,SACP,WAAAC,EACA,YAAAC,EACA,QAAAC,EACA,gBAAAC,EACA,MAAAC,EACA,aAAAC,EAAe,GACf,GAAGC,CACL,EAAGC,IAAQ,CACT,IAAMC,EAAYX,GAAM,SAClBY,EAAeC,EAAyBJ,EAAK,SAAW,WAAaJ,CAAO,EAC5ES,EAAkB,CACtB,GAAGf,EACH,GAAGgB,EACH,GAAGC,EAAsBd,CAAI,EAC7B,GAAGU,EAAaX,CAAK,EACrB,GAAGO,GAAgB,CACjB,eAAgB,WAClB,CACF,EACMS,EAAg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EACA,UAAW,CACT,MAAO,CACL,MAAO,SACT,EACA,KAAM,CACJ,MAAO,SACT,CACF,EACA,SAAU,CACR,MAAO,CACL,MAAO,SACT,EACA,KAAM,CACJ,MAAO,SACT,CACF,EACA,SAAU,CACR,MAAO,CACL,MAAO,UACP,OAAQ,aACV,EACA,KAAM,CACJ,MAAO,UACP,OAAQ,aACV,CACF,CACF,EACMU,EAAuB,CAC3B,MAAO,GACP,OAAQ,GACR,MAAO,GACP,OAAQ,EACV,EACMC,EAAe,CACnB,QAAS,OACT,WAAY,QACd,EACMG,EAAUC,EAAW/B,CAAU",
  "names": ["TextButton", "children", "style", "as", "theme", "size", "prefixIcon", "postfixIcon", "variant", "backgroundColor", "color", "isUnderlined", "rest", "ref", "Component", "variantStyle", "textButtonStyleByVariant", "textButtonStyle", "baseTextButtonStyle", "textButtonStyleBySize", "reshapedProps", "u", "p", "Icon", "getIconType", "getIconFill", "iconSizeByButtonSize", "contentStyle", "icon", "typography", "Default", "Y"]
}
