(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[442],{9482:function(e,a,t){"use strict";t.d(a,{Z:function(){return i}});var s=t(5893),l=t(5675),r=t.n(l);function i(){return(0,s.jsx)("div",{className:"bg-footer a-list-pt-xxl overflow-x-hidden",children:(0,s.jsxs)("div",{className:"container flex md-max:flex-col items-center a-list-px-md lg:a-list-px-lg",children:[(0,s.jsxs)("div",{className:"relative w-full a-list-pb-xxxl lg:w-1/2 gap-0 justify-end md-max:flex md-max:justify-center md-max:a-list-mb-lg lg:grid lg:grid-cols-[repeat(3,max-content)] xl-only:translate-x-[45px]",children:[(0,s.jsx)(r(),{src:"/avenue-partnership/football-close-up.webp",width:188,height:300,alt:"Artist",className:"inline-block relative top-0 left-[45px] lg:left-[30%] object-cover w-[188px] h-full z-0"}),(0,s.jsx)(r(),{src:"/avenue-partnership/paint-palette.webp",width:188,height:500,alt:"Artist",className:"inline-block relative top-[120px] object-cover w-[188px] h-full z-10"}),(0,s.jsx)(r(),{src:"/avenue-partnership/wine-glass.webp",width:188,height:500,alt:"Artist",className:"inline-block relative top-[80px] right-[45px] lg:right-[30%] object-cover w-[188px] h-full z-0"})]}),(0,s.jsx)("div",{className:"w-full lg:w-1/2 flex items-center md-max:justify-center md:justify-start lg:a-list-pl-md",children:(0,s.jsx)("a",{href:"https://www.avenuecalgary.com/",rel:"noopener noreferrer",target:"_blank",children:(0,s.jsx)(r(),{src:"/avenue-partnership/brought-to-you-by-avenue-magazine.webp",width:380,height:500,alt:"Brought to you by Avenue Magazine Calgary"})})})]})})}},2463:function(e,a,t){"use strict";t.d(a,{Z:function(){return i}});var s=t(5893),l=t(2310),r=t(9632);function i(e){let{title:a,description:t,buttonUrl:i,buttonText:n,backgroundColor:o}=e,{user:c}=(0,l.aF)();return(0,s.jsx)("section",{className:"a-list-py-xl a-list-px-md md:a-list-px-lg",style:{backgroundColor:o},children:(0,s.jsxs)("div",{className:"md:flex justify-between max-w-[1200px] mx-auto",children:[(0,s.jsxs)("div",{className:"md:a-list-pr-lg",children:[(0,s.jsx)("h2",{className:"font-semibold font-[degular] text-pretty text-2xl leading-none lg:text-3xl lg:leading-3xl text-cta-heading a-list-mb-md",children:c?"Questions?":a}),(0,s.jsx)("p",{className:"text-cta-body text-base md-max:a-list-mb-lg",children:c?"Visit our FAQs for all the answers!":t})]}),(0,s.jsx)(r.Z,{className:"self-center",href:c?"/faq":i,variant:"primary",children:c?"Visit FAQ":n})]})})}},2319:function(e,a,t){"use strict";t.d(a,{Z:function(){return i}});var s=t(5893),l=t(7902),r=t.n(l),i=()=>(0,s.jsxs)("span",{className:r().root,children:[(0,s.jsx)("span",{}),(0,s.jsx)("span",{}),(0,s.jsx)("span",{})]})},6588:function(e,a,t){"use strict";t.r(a);var s=t(5893),l=t(4184),r=t.n(l),i=t(9632),n=t(2319),o=t(771);a.default=e=>{let{formValues:a=o.defaultFormValues,formErrors:t={},validFields:l={},isLoading:c,isSubmitted:m,hasSubmissionAttempted:d,handleInput:u,handleSubmit:x}=e,{firstName:h="",lastName:f="",phoneNumber:p="",email:b="",message:g=""}=a,j=r()("block a-list-mb-base font-medium leading-none text-white text-subheading"),N=e=>r()("inline-flex w-full a-list-py-sm text-base leading-base border focus:outline-none active:border-gray focus:border-gray",{"border-hunter-green":l[e],"border-scarlet":d&&!!t[e]}),v=e=>r()('relative w-full a-list-mb-lg after:content-[""] after:inline-block after:left-0 after:w-full after:h-[10px] after:absolute after:top-[100%]',{"after:bg-hunter-green":l[e],"after:bg-scarlet":d&&!!t[e]}),w=r()("relative w-full resize-none min-h-[200px] border focus:outline-none active:border-gray focus:border-gray",{"border-hunter-green":l.message,"border-scarlet":d&&!!t.message}),y=r()('relative flex flex-col w-full a-list-mb-lg after:content-[""] after:inline-block after:left-0 after:w-full after:h-[10px] after:absolute after:top-[100%]',{"after:bg-hunter-green":l.message,"after:bg-scarlet":d&&!!t.message});return(0,s.jsxs)("form",{className:"bg-dark-cerulean a-list-pt-lg a-list-pb-xl a-list-px-lg tile-decorator",children:[(0,s.jsxs)("div",{className:"flex w-full gap-[12px]",children:[(0,s.jsxs)("div",{className:"flex flex-col flex-auto",children:[(0,s.jsx)("label",{htmlFor:"firstName",className:j,children:"First name"}),(0,s.jsx)("div",{className:v("firstName"),children:(0,s.jsx)("input",{type:"text",value:h,onChange:e=>u(e),name:"firstName",id:"firstName",autoComplete:"given-name",className:N("firstName")})})]}),(0,s.jsxs)("div",{className:"flex flex-col flex-auto",children:[(0,s.jsx)("label",{htmlFor:"lastName",className:j,children:"Last name"}),(0,s.jsx)("div",{className:v("lastName"),children:(0,s.jsx)("input",{type:"text",name:"lastName",id:"lastName",value:f,onChange:e=>u(e),autoComplete:"family-name",className:N("lastName")})})]})]}),(0,s.jsx)("label",{htmlFor:"email",className:j,children:"Email"}),(0,s.jsx)("div",{className:v("email"),children:(0,s.jsx)("input",{type:"email",name:"email",id:"email",value:b,autoComplete:"email",className:N("email"),onChange:e=>u(e)})}),(0,s.jsx)("label",{htmlFor:"phoneNumber",className:j,children:"Phone number"}),(0,s.jsx)("div",{className:v("phoneNumber"),children:(0,s.jsx)("input",{type:"tel",name:"phoneNumber",id:"phoneNumber",value:p,autoComplete:"tel",className:N("phoneNumber"),onChange:e=>u(e)})}),(0,s.jsx)("label",{htmlFor:"message",className:j,children:"Message"}),(0,s.jsx)("div",{className:y,children:(0,s.jsx)("textarea",{name:"message",id:"message",value:g,className:w,onChange:e=>u(e)})}),(0,s.jsxs)(i.Z,{className:"w-full",variant:"primary",isDisabled:m,onClick:e=>x(e),children:[(0,s.jsx)("span",{className:"a-list-mr-xs",children:c?"Sending message":"Send message"}),c&&(0,s.jsx)(n.Z,{})]})]})}},771:function(e,a,t){"use strict";t.r(a),t.d(a,{default:function(){return u},defaultFormValues:function(){return d}});var s=t(5893),l=t(7294),r=t(5186);let i=l.forwardRef(function(e,a){let{title:t,titleId:s,...r}=e;return l.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":s},r),t?l.createElement("title",{id:s},t):null,l.createElement("path",{d:"M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z"}))});var n=t(9482),o=t(2463),c=t(7553),m=t(6588);let d={firstName:"",lastName:"",email:"",phoneNumber:"",message:""};function u(){var e;let a;let[t,u]=(0,l.useState)(d),[x,h]=(0,l.useState)({}),[f,p]=(0,l.useState)({}),[b,g]=(0,l.useState)(!1),[j,N]=(0,l.useState)(!1),[v,w]=(0,l.useState)(!1),y=(e,a)=>{switch(e){case"firstName":return a.trim()?null:"First name is required";case"lastName":return a.trim()?null:"Last name is required";case"email":return a.includes("@")?null:"Email is invalid";case"phoneNumber":return a.length>=10?null:"Phone number must be at least 10 digits";case"message":return a.trim().length>=10?null:"Message must be at least 10 characters";default:return null}},k=()=>{let e={},a={};return Object.keys(t).forEach(s=>{let l=t[s],r=y(s,l);r?e[s]=r:a[s]=l}),h(e),p(a),e},F=()=>{g(!1),N(!1),h({}),u(d),p({})},C=(e=(e,a)=>{let t=y(e,a);h(a=>({...a,[e]:t||""})),p(a=>({...a,...t?{[e]:!1}:{[e]:!0}}))},function(){for(var t=arguments.length,s=Array(t),l=0;l<t;l++)s[l]=arguments[l];clearTimeout(a),a=setTimeout(()=>e(...s),300)}),S=async e=>{e.preventDefault(),w(!0);let a=k();if(Object.keys(a).length>0){w(!1),console.error("Error submitting form",a),h(a),N(!0);return}let{firstName:s,lastName:l,email:i,phoneNumber:n,message:o}=t,{data:c,error:m}=await r.O.from("form_submissions").insert([{first_name:s,last_name:l,phone_number:n,email:i,message:o}]);if(m){console.error("Error saving data",m),w(!1);return}await fetch("/api/v1/notifications/contactFormSubmission",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}),w(!1),g(!0)};return(0,s.jsxs)("section",{className:"relative isolate bg-contact-us",children:[(0,s.jsxs)("div",{className:"container a-list-mb-lg a-list-pt-xxxl",children:[(0,s.jsxs)("h1",{className:"text-contact-us-heading page-heading",children:["Contact Us",(0,s.jsx)("span",{className:"font-[inter]",children:"*"})]}),(0,s.jsx)("p",{className:"max-w-[800px] mx-auto text-center text-subheading leading-subheading text-contact-us-body",children:"Have questions or comments? We'd love to hear from you! Your feedback helps us make A-List the best it can be."})]}),(0,s.jsx)("div",{className:"container a-list-pt-base a-list-pb-lg a-list-px-md md:a-list-pb-xl md:a-list-px-lg",children:(0,s.jsxs)("div",{className:"flex md-max:flex-col",children:[(0,s.jsx)("div",{className:"md-max:order-2 w-full lg:w-1/2 flex flex-col",children:(0,s.jsxs)("address",{className:"text-contact-us-body not-italic text-base leading-base",children:[(0,s.jsxs)("div",{className:"flex gap-[15px] a-list-mb-lg",children:[(0,s.jsx)(c.Z,{className:"relative top-[4px]",icon:"address",color:"#FFF31D"}),(0,s.jsxs)("p",{children:["Mailing Address Only",(0,s.jsx)("br",{}),"1721 29 Ave SW",(0,s.jsx)("br",{}),"Suite 375",(0,s.jsx)("br",{}),"Calgary, AB",(0,s.jsx)("br",{}),"T2T 6T7"]})]}),(0,s.jsxs)("p",{className:"flex gap-[15px] a-list-mb-lg",children:[(0,s.jsx)(c.Z,{icon:"telephone",color:"#FFF31D"}),(0,s.jsx)("a",{href:"tel:+11234567890",children:"(403)-240-9055"})]}),(0,s.jsxs)("p",{className:"flex gap-[15px] a-list-mb-lg",children:[(0,s.jsx)(c.Z,{icon:"email",color:"#FFF31D"}),(0,s.jsx)("a",{href:"mailto:alist@redpointmedia.ca",target:"_blank",rel:"noopener noreferrer",children:"alist@redpointmedia.ca"})]})]})}),(0,s.jsxs)("div",{className:"md-max:order-1 md-max:a-list-mb-lg relative w-full lg:w-1/2 flex flex-col",children:[(0,s.jsx)(m.default,{formValues:t,formErrors:x,validFields:f,handleInput:e=>{let{name:a,value:t}=e.target;b&&F(),u(e=>({...e,[a]:t})),C(a,t)},handleSubmit:S,isLoading:v,isSubmitted:b,hasSubmissionAttempted:j}),b&&(0,s.jsxs)("aside",{className:"absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 w-[80%] a-list-px-md a-list-pt-md a-list-pb-lg bg-dark-cerulean border border-2 border-white shadow-lg rounded-[4px] z-10",children:[(0,s.jsx)("button",{className:"absolute top-[15px] right-[15px]",onClick:F,children:(0,s.jsx)(i,{className:"h-[32px] w-[32px] text-white","aria-hidden":"true"})}),(0,s.jsx)("h2",{className:"text-contact-us-body font-semibold text-lg leading-lg a-list-mb-md",children:"Thank you!"}),(0,s.jsx)("p",{className:"text-contact-us-body text-base leading-base",children:"Your message has been sent to our team. We will get back to you as soon as possible."})]})]})]})}),(0,s.jsx)(o.Z,{title:"Questions?",description:"Visit our FAQ's for all the answers.",buttonText:"Visit FAQ",buttonUrl:"/faq",backgroundColor:"#00566A"}),(0,s.jsx)(n.Z,{})]})}},7902:function(e){e.exports={root:"LoadingDots_root__8o4w0",blink:"LoadingDots_blink__iunUN"}}}]);