{"version":3,"file":"GoogleFormButton.DWsIyj4U.mjs","names":[],"sources":["https:/framerusercontent.com/modules/TgeM98RCWxHU4uyrzVP7/3hp4OEfaXmLFfvCBguVd/GoogleFormButton.js"],"sourcesContent":["// Welcome to Code in Framer\n// Get Started: https://www.framer.com/developers/\nimport{jsx as _jsx}from\"react/jsx-runtime\";import{useMemo}from\"react\";import{addPropertyControls,ControlType}from\"framer\";import{useWithLogin}from\"https://asset.29cm.co.kr/contents/framer/hooks/useWithLogin.js\";import{useCurrentUser}from\"https://asset.29cm.co.kr/contents/framer/hooks/useCurrentUser.js\";import{isWebview}from\"https://asset.29cm.co.kr/contents/framer/utils/device.js\";/**\n * These annotations control how your component sizes\n * Learn more: https://www.framer.com/developers/#code-components-auto-sizing\n *\n * @framerSupportedLayoutWidth auto\n * @framerSupportedLayoutHeight auto\n */export default function GoogleFormButton({children,formUrl,fieldId}){const withLogin=useWithLogin();const user=useCurrentUser();const href=useMemo(()=>{},[formUrl,fieldId,user]);const handleClick=withLogin(e=>{const url=new URL(formUrl);url.search=\"\";url.searchParams.append(fieldId,user.userNo);if(isWebview()){document.location.href=`app29cm://outlink/${encodeURIComponent(url.href)}`;}else{window.open(url.href,\"_blank\");}});return /*#__PURE__*/_jsx(\"a\",{href:\"\",target:\"_blank\",style:{textDecoration:\"none\",color:\"inherit\"},onClick:e=>{e.preventDefault();handleClick(e);},children:children});}addPropertyControls(GoogleFormButton,{children:{type:ControlType.ComponentInstance},formUrl:{type:ControlType.String,description:\"구글폼 URL\",defaultValue:\"https://docs.google.com/forms/d/e/1FAIpQLSck0zqiWO3bciM2S9WCWb4BbFMdbv-O8YE9YEvUdZOUGR_0_g/viewform\"},fieldId:{title:\"엔트리 넘버\",type:ControlType.String,description:\"구글폼 userNo 식별자\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"GoogleFormButton\",\"slots\":[\"children\"],\"annotations\":{\"framerSupportedLayoutWidth\":\"auto\",\"framerSupportedLayoutHeight\":\"auto\",\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./GoogleFormButton.map"],"mappings":"gTAQG,SAAwB,EAAiB,CAAC,WAAS,UAAQ,WAAS,CAAC,IAAM,EAAU,GAAc,CAAO,EAAK,GAAgB,CAAY,MAAY,GAAG,CAAC,EAAQ,EAAQ,EAAK,CAAC,CAAC,IAAM,EAAY,EAAU,GAAG,CAAC,IAAM,EAAI,IAAI,IAAI,EAAQ,CAAC,EAAI,OAAO,GAAG,EAAI,aAAa,OAAO,EAAQ,EAAK,OAAO,CAAI,GAAW,CAAE,SAAS,SAAS,KAAK,qBAAqB,mBAAmB,EAAI,KAAK,GAAS,EAAO,KAAK,EAAI,KAAK,SAAS,EAAI,CAAC,OAAoB,EAAK,IAAI,CAAC,KAAK,GAAG,OAAO,SAAS,MAAM,CAAC,eAAe,OAAO,MAAM,UAAU,CAAC,QAAQ,GAAG,CAAC,EAAE,gBAAgB,CAAC,EAAY,EAAE,EAAY,WAAS,CAAC,sBAN3iB,IAA2B,IAAoD,IAAyF,IAA6F,IAAgF,CAMwN,EAAoB,EAAiB,CAAC,SAAS,CAAC,KAAK,EAAY,kBAAkB,CAAC,QAAQ,CAAC,KAAK,EAAY,OAAO,YAAY,UAAU,aAAa,sGAAsG,CAAC,QAAQ,CAAC,MAAM,SAAS,KAAK,EAAY,OAAO,YAAY,iBAAiB,CAAC,CAAC"}