{
  "version": 3,
  "sources": ["ssg:https://framerusercontent.com/modules/wRCfuvJUFRQ0wYlJVLju/t1v2jnbPtyR4dEONpbSm/Eventbrite.js"],
  "sourcesContent": ["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { addPropertyControls, ControlType } from \"framer\";\nimport { motion } from \"framer-motion\";\nimport * as React from \"react\";\nimport { usePadding, useRadius, paddingControl, borderRadiusControl, useFontControls, fontControls } from \"https://framer.com/m/framer/default-utils.js@^0.45.0\";\nexport default function Eventbrite({\n  eventId,\n  label,\n  fill,\n  color,\n  onComplete,\n  style,\n  ...props\n}) {\n  const {\n    fontFamily,\n    fontSize,\n    fontWeight\n  } = useFontControls(props);\n  const borderRadius = useRadius(props);\n  const paddingValue = usePadding(props);\n  const buttonId = \"eventbright-\" + eventId;\n  React.useEffect(() => {\n    const script = document.createElement(\"script\");\n    script.onload = () => {\n      // @ts-ignore\n      window.EBWidgets.createWidget({\n        widgetType: \"checkout\",\n        eventId: eventId,\n        modal: true,\n        modalTriggerElementId: buttonId,\n        onOrderComplete: onComplete\n      });\n    };\n    script.src = \"https://www.eventbrite.com/static/widgets/eb_widgets.js\";\n    script.async = true;\n    document.body.appendChild(script);\n    return () => {\n      document.body.removeChild(script);\n    };\n  }, [eventId, onComplete]);\n  return /*#__PURE__*/_jsx(motion.button, {\n    id: buttonId,\n    type: \"submit\",\n    style: {\n      border: \"none\",\n      outline: \"none\",\n      resize: \"none\",\n      width: \"max-content\",\n      wordBreak: \"break-word\",\n      overflowWrap: \"break-word\",\n      WebkitTapHighlightColor: \"rgba(0, 0, 0, 0)\",\n      letterSpacing: \"-0.2px\",\n      display: \"flex\",\n      justifyContent: \"center\",\n      alignItems: \"center\",\n      background: fill,\n      borderRadius,\n      cursor: \"pointer\",\n      padding: paddingValue,\n      fontFamily,\n      fontWeight,\n      fontSize,\n      color,\n      ...style\n    },\n    transition: {\n      type: \"ease\",\n      duration: .3\n    },\n    whileHover: {\n      opacity: .8\n    },\n    children: label\n  });\n}\n;\nEventbrite.defaultProps = {\n  label: \"Buy Tickets\",\n  color: \"#fff\",\n  fontSize: 16,\n  fontFamily: \"Inter\",\n  fontWeight: 500,\n  padding: 15,\n  borderRadius: 8\n};\naddPropertyControls(Eventbrite, {\n  eventId: {\n    title: \"ID\",\n    type: ControlType.String,\n    placeholder: \"123456890\",\n    description: \"Create an [Eventbrite](https://www.eventbrite.com/) account, add an event and copy its ID.\"\n  },\n  label: {\n    type: ControlType.String,\n    title: \"Label\"\n  },\n  fill: {\n    type: ControlType.Color,\n    title: \"Fill\",\n    defaultValue: \"#f53\"\n  },\n  color: {\n    type: ControlType.Color,\n    title: \"Text\"\n  },\n  ...fontControls,\n  fontSize: {\n    title: \"Font Size\",\n    type: ControlType.Number,\n    displayStepper: true,\n    defaultValue: 16\n  },\n  ...paddingControl,\n  ...borderRadiusControl,\n  onComplete: {\n    type: ControlType.EventHandler\n  }\n});\nexport const __FramerMetadata__ = {\n  \"exports\": {\n    \"default\": {\n      \"type\": \"reactComponent\",\n      \"name\": \"Eventbrite\",\n      \"slots\": [],\n      \"annotations\": {\n        \"framerContractVersion\": \"1\"\n      }\n    },\n    \"__FramerMetadata__\": {\n      \"type\": \"variable\"\n    }\n  }\n};\n//# sourceMappingURL=./Eventbrite.map"],
  "mappings": "4NAKe,SAARA,EAA4B,CACjC,QAAAC,EACA,MAAAC,EACA,KAAAC,EACA,MAAAC,EACA,WAAAC,EACA,MAAAC,EACA,GAAGC,CACL,EAAG,CACD,GAAM,CACJ,WAAAC,EACA,SAAAC,EACA,WAAAC,CACF,EAAIC,EAAgBJ,CAAK,EACnBK,EAAeC,EAAUN,CAAK,EAC9BO,EAAeC,EAAWR,CAAK,EAC/BS,EAAW,eAAiBf,EAClC,OAAMgB,EAAU,IAAM,CACpB,IAAMC,EAAS,SAAS,cAAc,QAAQ,EAC9C,OAAAA,EAAO,OAAS,IAAM,CAEpBC,EAAO,UAAU,aAAa,CAC5B,WAAY,WACZ,QAASlB,EACT,MAAO,GACP,sBAAuBe,EACvB,gBAAiBX,CACnB,CAAC,CACH,EACAa,EAAO,IAAM,0DACbA,EAAO,MAAQ,GACf,SAAS,KAAK,YAAYA,CAAM,EACzB,IAAM,CACX,SAAS,KAAK,YAAYA,CAAM,CAClC,CACF,EAAG,CAACjB,EAASI,CAAU,CAAC,EACJe,EAAKC,EAAO,OAAQ,CACtC,GAAIL,EACJ,KAAM,SACN,MAAO,CACL,OAAQ,OACR,QAAS,OACT,OAAQ,OACR,MAAO,cACP,UAAW,aACX,aAAc,aACd,wBAAyB,mBACzB,cAAe,SACf,QAAS,OACT,eAAgB,SAChB,WAAY,SACZ,WAAYb,EACZ,aAAAS,EACA,OAAQ,UACR,QAASE,EACT,WAAAN,EACA,WAAAE,EACA,SAAAD,EACA,MAAAL,EACA,GAAGE,CACL,EACA,WAAY,CACV,KAAM,OACN,SAAU,EACZ,EACA,WAAY,CACV,QAAS,EACX,EACA,SAAUJ,CACZ,CAAC,CACH,CAEAF,EAAW,aAAe,CACxB,MAAO,cACP,MAAO,OACP,SAAU,GACV,WAAY,QACZ,WAAY,IACZ,QAAS,GACT,aAAc,CAChB,EACAsB,EAAoBtB,EAAY,CAC9B,QAAS,CACP,MAAO,KACP,KAAMuB,EAAY,OAClB,YAAa,YACb,YAAa,4FACf,EACA,MAAO,CACL,KAAMA,EAAY,OAClB,MAAO,OACT,EACA,KAAM,CACJ,KAAMA,EAAY,MAClB,MAAO,OACP,aAAc,MAChB,EACA,MAAO,CACL,KAAMA,EAAY,MAClB,MAAO,MACT,EACA,GAAGC,EACH,SAAU,CACR,MAAO,YACP,KAAMD,EAAY,OAClB,eAAgB,GAChB,aAAc,EAChB,EACA,GAAGE,EACH,GAAGC,EACH,WAAY,CACV,KAAMH,EAAY,YACpB,CACF,CAAC",
  "names": ["Eventbrite", "eventId", "label", "fill", "color", "onComplete", "style", "props", "fontFamily", "fontSize", "fontWeight", "useFontControls", "borderRadius", "useRadius", "paddingValue", "usePadding", "buttonId", "ue", "script", "window", "p", "motion", "addPropertyControls", "ControlType", "fontControls", "paddingControl", "borderRadiusControl"]
}
