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C,UAAU,+BAGZ,uBAAKA,UAAU,yCAEjB,uBAAKA,UAAU,uDACb,uBAAKA,UAAU,SACb,uBAAKA,UAAU,gBACb,uBAAKA,UAAU,sBAMzB,uBAAKA,UAAU,4BACb,uBACE+B,IAAKC,EACLC,IAAI,eACJjC,UAAU,gCAId,uBAAKA,UAAU,uBACb,uBAAKA,UAAU,+CACb,qBAAGA,UAAU,oEAAb,yFAIA,2BACA,qBAAGA,UAAU,oEAAb,qCAGA,2BACA,qBAAGA,UAAU,oEAAb,0GAIA,2BACA,qBAAGA,UAAU,oEAAb,kJAKA,uBAAKA,UAAU,+BACb,uBAAKA,UAAU,0BACb,gBAACG,EAAD,CACEC,QAASuB,EAAgB,GACzBtB,KAAK,uBACLC,OAAQ,QAKd,qBAAGN,UAAU,oEAAb,iCAGA,2BACA,qBAAGA,UAAU,oEAAb,6IAtEZ,C","sources":["webpack://waxcarvers-fe/./src/components/Common/PageTitle.jsx","webpack://waxcarvers-fe/./src/static/voucher/voucher.png","webpack://waxcarvers-fe/./src/pages/gift-card.js"],"sourcesContent":["import React from \"react\";\n\nexport const PageTitle = ({ title, subtitle }) => (\n
\n

{title}

\n

\n {subtitle}\n

\n
\n);\n\nexport const PageSubTitle = ({ title, subtitle, color }) => (\n
\n \n {title}\n \n

\n {subtitle}\n

\n
\n);\n","export default __webpack_public_path__ + \"static/voucher-3028cc9792294922cdb8656865814bdd.png\";","import React, { useContext } from \"react\";\nimport placeholder from \"../static/voucher/voucher.png\";\nimport { AppContext } from \"../context\";\nimport { useStripeCheckout } from \"../hooks/useStripeCheckout\";\nimport Layout from \"../components/layout\";\nimport { PageTitle } from \"../components/Common/PageTitle\";\n\nconst CheckoutButton = ({\n product,\n text = \"Continue to payment\",\n amount = 5000,\n}) => {\n const { loading, redirectToCheckout } = useStripeCheckout(product, {\n isGiftCard: true,\n giftCardAmount: amount,\n });\n\n return (\n \n \n {loading ? (\n
\n \n \n \n   Creating Order\n
\n ) : (\n text\n )}\n \n
\n );\n};\n\nconst GiftCardSalesPage = () => {\n const { state: contextState } = useContext(AppContext);\n const products = contextState ? contextState.products : [];\n console.log(contextState.products);\n const giftCardProduct = products.filter((it) => {\n return it.metadata.type === \"gift_card\";\n });\n\n console.log(giftCardProduct[0]);\n\n return (\n \n
\n
\n \n
\n
\n
\n
\n
\n \n\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n \n
\n\n
\n
\n

\n Know someone that would love to take a class, but you’re not\n sure what class that is?\n

\n
\n

\n Why not give them a gift voucher!\n

\n
\n

\n The price for a regular class is €50, but email me if you want a\n gift voucher with a different amount.\n

\n
\n

\n You receive purchase confirmation immediately. Please give me 24\n hours to send you a PDF version of the gift voucher with all the\n information.\n

\n
\n
\n \n
\n
\n\n

\n How to redeem a gift voucher:\n

\n
\n

\n Send me an email with your email address, voucher number, and\n the class you want to take. That way I can set up your account\n for you.\n

\n
\n
\n
\n
\n
\n );\n};\n\nexport default GiftCardSalesPage;\n"],"names":["PageTitle","title","subtitle","className","PageSubTitle","color","CheckoutButton","product","text","amount","loading","redirectToCheckout","useStripeCheckout","isGiftCard","giftCardAmount","type","onClick","xmlns","viewBox","fill","fillRule","d","clipRule","state","contextState","useContext","AppContext","products","console","log","giftCardProduct","filter","it","metadata","src","placeholder","alt"],"sourceRoot":""}