1"use strict";(self.webpackChunkcanadian_coastal_retail=self.webpackChunkcanadian_coastal_retail||[]).push([[6648],{1588:function(e,t,a){a.r(t),a.d(t,{Head:function(){return E}});var n=a(6540),r=a(4794),i=a(2434),l=a(9067),o=a(7483),m=a(4790),s=a(2471),u=a(4073),c=a(7425),d=a(2664),h=a(7028),f=a(4053),p=a(2639),g=a(203),v=a(1668);const E=e=>n.createElement(h.tP,Object.assign({},e,{title:"Gift Certificates for Sailing Experiences",description:"Sailing Gift Certificates are the perfect gift for those that love adventure or are planning summertime celebrations.",sd:[(0,h.jM)({id:"https://canadiancoastal.com/",name:"Canadian Coastal Sailing"},{id:"https://canadiancoastal.com/gifting/sailing-gift-cards-and-vouchers/",name:"Gifts"},{id:"https://canadiancoastal.com/shop/sailing-gift-certificate/",name:"Sailing Gift Cards"})]})),C=e=>{let{onSubmit:t}=e;return n.createElement(c.l1,{initialValues:{item:{amount:"100"},from:{name:"",email:"",phone:""},to:{name:"",email:""},message:"",notes:""},enableReinitialize:!0,onSubmit:(e,a)=>{t(e).catch((e=>{})).finally((()=>a.setSubmitting(!1)))},validationSchema:d.Ik().shape({item:d.Ik().shape({amount:d.ai().min(50,"Minimum value for a Gift Certificate is $50").required("Please specify an amount for the gift certificate")}),from:d.Ik().shape({name:d.Yj().required("Please provide your name."),email:d.Yj().email("It looks like there is an error in your email address.").required("Please provide your email."),phone:d.Yj().required("Please provide your phone number.")}),to:d.Ik().shape({name:d.Yj().required("Please provide the recipient's name."),email:d.Yj().email("It looks like there is an error in the recipient's email address.").required("Please provide the recipient's email.")})})},(e=>{let{values:t,touched:a,errors:r,dirty:i,isSubmitting:o,setFieldTouched:m,handleChange:s,handleBlur:u,handleSubmit:c}=e;return n.createElement("form",{onSubmit:c},n.createElement(b,{certificate:t,touched:a,errors:r,setFieldTouched:m,onBlur:u,onChange:s}),n.createElement(l.A,{mt:4},n.createElement(A,null)),n.createElement(l.A,{mt:4},n.createElement(h.US,{type:"submit",disabled:!i,processing:!!o,sx:{width:"100%"}},"Next")))}))},b=e=>{let{certificate:t,touched:a,errors:r,setFieldTouched:i,onBlur:u,onChange:d}=e;const{0:h,1:f}=(0,n.useState)("100"),{0:p,1:g}=(0,n.useState)("");return n.createElement(n.Fragment,null,n.createElement(x,null,n.createElement(S,{title:"Choose an amount (Canadian Dollars)"},n.createElement(l.A,{sx:{pb:2}},n.createElement(o.A,{color:"primary",name:"item.amount",value:h,exclusive:!0,onChange:(e,t)=>
1{t&&(d({target:{name:"item.amount",value:t}}),f(t),g(""))}},n.createElement(m.A,{value:"100",sx:{px:4}},"$100"),n.createElement(m.A,{value:"150",sx:{px:4}},"$150"),n.createElement(m.A,{value:"250",sx:{px:4}},"$250"))),n.createElement(s.A,{id:"item.amount",name:"item.amount",placeholder:"Custom Amount",value:p,onChange:e=>{switch(i("item.amount"),e.target.value){case"":case null:case void 0:g(""),h||d(e);break;default:d(e),g(e.target.value),""!==e.target.value&&f(null)}},InputProps:{inputComponent:O},fullWidth:!0,error:Boolean((0,c.O6)(a,"item.amount")&&(0,c.O6)(r,"item.amount")),helperText:(0,c.O6)(a,"item.amount")&&(0,c.O6)(r,"item.amount")||" "}))),n.createElement(x,null,n.createElement(S,{title:"Who's it for?"},n.createElement(s.A,{id:"to.name",label:"Recipient Name",value:t&&t.to&&t.to.name,onBlur:u,onChange:d,fullWidth:!0,error:Boolean((0,c.O6)(a,"to.name")&&(0,c.O6)(r,"to.name")),helperText:(0,c.O6)(a,"to.name")&&(0,c.O6)(r,"to.name")||" "}),n.createElement(s.A,{id:"to.email",label:"Recipient Email",type:"email",value:t&&t.to&&t.to.email,onBlur:u,onChange:d,fullWidth:!0,error:Boolean((0,c.O6)(a,"to.email")&&(0,c.O6)(r,"to.email")),helperText:(0,c.O6)(a,"to.email")&&(0,c.O6)(r,"to.email")||" "})),n.createElement(S,{title:"Add a message"},n.createElement(s.A,{id:"message",label:"Gift Message",value:t&&t.message,onBlur:u,onChange:d,fullWidth:!0,multiline:!0,rows:3,variant:"outlined",sx:{pb:"20px"}}))),n.createElement(x,null,n.createElement(S,{title:"Who's it from?"},n.createElement(s.A,{id:"from.name",label:"Sender Name",value:t&&t.from&&t.from.name,onBlur:u,onChange:d,fullWidth:!0,error:Boolean((0,c.O6)(a,"from.name")&&(0,c.O6)(r,"from.name")),helperText:(0,c.O6)(a,"from.name")&&(0,c.O6)(r,"from.name")||" "}),n.createElement(s.A,{id:"from.email",label:"Sender Email",type:"email",value:t&&t.from&&t.from.email,onBlur:u,onChange:d,fullWidth:!0,error:Boolean((0,c.O6)(a,"from.email")&&(0,c.O6)(r,"from.email")),helperText:(0,c.O6)(a,"from.email")&&(0,c.O6)(r,"from.email")||" "}),n.createElement(s.A,{id:"from.phone",label:"Sender Phone",value:t&&t.phone&&t.from.phone,onBlur:u,onChange:d,fullWidth:!0,error:Boolean((0,c.O6)(a,"from.phone")&&(0,c.O6)(r,"from.phone")),helperText:(0,c.O6)(a,"from.phone")&&(0,c.O6)(r,"from.phone")||" "}))),n.createElement(x,null,n.createElement(S,{title:"Notes and Special Requests"},n.createElement(s.A,{id:"notes",label:"Questions, comments or special requests to the crew",value:t&&t.notes,onBlur:u,onChange:d,fullWidth:!0,multiline:!0,rows:3,variant:"outlined"}))))},S=e=>{let{title:t,children:a}=e;return n.createElement(l.A,{sx:{}},n.createElement(u.A,{variant:"label",sx:{mb:"10px"},component:"div"},t),a)},x=e=>{let{children:t}=e;return n.createElement(l.A,{sx:{pt:4}},t)},O=n.forwardRef((function(e,t){const{onChange:a,...r}=e;return n.createElement(i.HG,Object.assign({},r,{getInputRef:t,onValueChange:t=>{a({target:{name:e.name,value:t.value}})},thousandSeparator:!0,valueIsNumericString:!0,prefix:"$"}))})),A=e=>{let{}=e;return n.createElement(l.A,null,n.createElement(u.A,{variant:"caption"},"Gift Certificates do not expire. No fees apply to purchase or activate this Certificate. Redeemable toward the purchase of eligible goods and services on the Canadian Coastal Sailing website. Certificate is non-reloadable and, except where required by law, cannot be redeemed for cash, refunded, returned, or resold. Issuer is not responsible for lost, damaged, or stolen cards, or for unauthorized use. Issued by Canadian Coastal Sailing, Inc."," ",n.createElement("a",{href:"/legal/gift-certificate-and-voucher-terms/"},"Terms and Conditions")," ","apply."))};t.default=e=>{let{data:{productImage:t}}=e;const{0:a,1:i}=(0,n.useState)(),l=(0,p.n)(),o=(0,v.G1)(),{getAffiliate:m}=(0,g.L)();return n.createElement(f.A,{open:!!a,message:a,onClose:()=>i(void 0),productTitle:"Purchase Canadian Coastal Sailing Gift Certificates",image:t,alt:"Gift Card for Sailing"},n.createElement(C,{onSubmit:e=>(i(null),new Promise(((t,a)=>{o.create("/api/gifting/giftcards/giftcard/",e,m().id).then((t=>{let{payload:a}=t;(0,r.navigate)("/shop/thank-you/",{state:{product:"gift certificate",contact:{name:e.from.name,email:e.from.email,phone:e.from.phone}}})})).catch((e=>{l.error({error:e,location:"SailingGiftCertificate.onSubmit"}),i(e&&("string"==typeof e?e:"Sorry, but we were unable to process the voucher request.")),a(e)}))})))}))}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.