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,OAC3G,KAAM,KAAM,CACb,CAACE,EAAAA,YAAaT,EAAAA,EAAAA,OAAOhE,OAEvBqE,EAAAA,EAAAA,iBAAgBnD,EAAAA,EAAAA,oBAAoB,SAAU,CAC5CJ,MAAO,yBACPlB,KAAM,SACN,sBAAuB+D,EAAO,KAAOA,EAAO,GAAMY,IAAiBC,EAAAA,EAAAA,OAAO9D,GAAWA,EAAQwB,MAAQqC,EAAS,OAC7GvC,EAAa,KAAM,CACpB,CAAC0C,EAAAA,cAAeV,EAAAA,EAAAA,OAAOtD,OAEzB2D,EAAAA,EAAAA,iBAAgBnD,EAAAA,EAAAA,oBAAoB,WAAY,CAC9CJ,MAAO,yBACPlB,KAAM,UACN0E,YAAa,eACb,sBAAuBX,EAAO,KAAOA,EAAO,GAAMY,IAAiBC,EAAAA,EAAAA,OAAOvE,GAAYA,EAASiC,MAAQqC,EAAS,OAC/G,KAAM,KAAM,CACb,CAACE,EAAAA,YAAaT,EAAAA,EAAAA,OAAO/D,MAEvBgC,GACC,eAOnB,IC9JA,MAAM0C,EAAc,EAEpB,O","sources":["webpack://familytoday-frontend/./src/services/contactus.service.ts","webpack://familytoday-frontend/./src/components/emails/ContactUs.vue?cf3c","webpack://familytoday-frontend/./src/components/emails/ContactUs.vue"],"sourcesContent":["import { ContactUs } from '../common/models/contactus/contact-us.model';\nimport { AdvertiseWithUs } from '../common/models/contactus/advertise-with-us.model';\nimport { FetchService } from './fetch.service';\nimport { VueLogger } from 'vue-logger-plugin/dist/types/logger';\n\nconst endpointBase = 'https://www.familytoday.com/ftapi/contactus';\n\nexport class ContactUsService {\n private logger: VueLogger;\n private fetchService: FetchService | undefined;\n\n constructor(logger: VueLogger, fetchService: FetchService | undefined) {\n this.logger = logger;\n this.fetchService = fetchService;\n }\n\n /**\n * Advertise with us form\n * @param advertiseWithUs advertisement information to send over\n */\n async advertiseWithUs(advertiseWithUs: AdvertiseWithUs): Promise<boolean> {\n const formData =\n 'name=' +\n advertiseWithUs.name +\n '&title=' +\n advertiseWithUs.title +\n '&phone=' +\n advertiseWithUs.phone +\n '&company=' +\n advertiseWithUs.company +\n '&email=' +\n advertiseWithUs.email +\n '&message=' +\n advertiseWithUs.message +\n '&g-recaptcha-response=' +\n advertiseWithUs.gRecaptchaResponse;\n\n return new Promise((resolve) => {\n if (this.fetchService) {\n this.fetchService\n .post(\n `${endpointBase}/advertisewithuscontact`,\n formData,\n 'application/x-www-form-urlencoded'\n )\n .then((response) => {\n resolve(response.ok);\n });\n } else {\n resolve(false);\n }\n });\n }\n\n /**\n * Contact us form submission\n * @param contactUs contact information to send over\n */\n async contactUs(contactUs: ContactUs): Promise<boolean> {\n const formData =\n 'email=' +\n contactUs.email +\n '&message=' +\n contactUs.message +\n '&reason=' +\n contactUs.reason;\n\n return new Promise((resolve) => {\n if (this.fetchService) {\n this.fetchService\n .post(\n `${endpointBase}/aboutuscontact`,\n formData,\n 'application/x-www-form-urlencoded'\n )\n .then((response) => {\n resolve(response.ok);\n });\n } else {\n resolve(false);\n }\n });\n }\n}\n","import { defineComponent as _defineComponent } from 'vue'\nimport { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, unref as _unref, renderList as _renderList, Fragment as _Fragment, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, isRef as _isRef, vModelText as _vModelText, withDirectives as _withDirectives, vModelSelect as _vModelSelect } from \"vue\"\n\nconst _hoisted_1 = {\n main: \"\",\n id: \"about-us-page\",\n class: \"about-us-page\"\n}\nconst _hoisted_2 = { class: \"stripe stripe-diagonal\" }\nconst _hoisted_3 = { class: \"container narrow form-area\" }\nconst _hoisted_4 = /*#__PURE__*/_createElementVNode(\"h2\", null, \"We would love to hear from you!\", -1)\nconst _hoisted_5 = { key: 0 }\nconst _hoisted_6 = { key: 1 }\nconst _hoisted_7 = /*#__PURE__*/_createElementVNode(\"button\", {\n type: \"button\",\n class: \"close\",\n \"data-dismiss\": \"alert\"\n}, \" × \", -1)\nconst _hoisted_8 = /*#__PURE__*/_createElementVNode(\"option\", { disabled: \"\" }, \"Area of interest\", -1)\nconst _hoisted_9 = /*#__PURE__*/_createElementVNode(\"option\", null, \"Advertising\", -1)\nconst _hoisted_10 = /*#__PURE__*/_createElementVNode(\"option\", null, \"Media kits\", -1)\nconst _hoisted_11 = /*#__PURE__*/_createElementVNode(\"option\", null, \"Press Inquiry\", -1)\nconst _hoisted_12 = /*#__PURE__*/_createElementVNode(\"option\", null, \"Editorial submissions\", -1)\nconst _hoisted_13 = /*#__PURE__*/_createElementVNode(\"option\", null, \"Newsletters\", -1)\nconst _hoisted_14 = /*#__PURE__*/_createElementVNode(\"option\", null, \"Other\", -1)\nconst _hoisted_15 = [\n _hoisted_8,\n _hoisted_9,\n _hoisted_10,\n _hoisted_11,\n _hoisted_12,\n _hoisted_13,\n _hoisted_14\n]\nconst _hoisted_16 = /*#__PURE__*/_createElementVNode(\"input\", {\n type: \"submit\",\n class: \"btn btn-prime-1\",\n value: \"submit\"\n}, null, -1)\n\nimport { ref, inject } from \"vue\";\nimport { useLogger } from \"vue-logger-plugin\";\nimport { useField, useForm } from \"vee-validate\";\nimport { ContactUs } from \"../../common/models/contactus/contact-us.model\";\nimport { ContactUsService } from \"../../services/contactus.service\";\nimport { FetchService } from \"../../services/fetch.service\";\nimport useValidators from \"../../composables/validators.composable\";\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'ContactUs',\n setup(__props) {\n\nconst logger = useLogger();\n\n// inject our locationservice\nconst fetchService: FetchService | undefined = inject(\"FetchService\");\n// instantiate instance of ContactUs Service\nconst contactUsService = new ContactUsService(logger, fetchService);\n\n// get validators\nconst { isRequired, isEmail, isOneOf } = useValidators();\n// generate validation schema\nconst validationSchema = {\n email: (value: string) => isRequired(value) && isEmail(value),\n message: (value: string) => isRequired(value),\n reason: (value: string) =>\n isRequired(value) &&\n isOneOf(value, [\n \"Advertising\",\n \"Media kits\",\n \"Press Inquiry\",\n \"Editorial submissions\",\n \"Newsletters\",\n \"Other\",\n ]),\n};\n\n// Form Configuration\nconst { handleSubmit, errors } = useForm({ validationSchema });\n\n// Field Configurations\nconst { value: email } = useField(\"email\");\nconst { value: message } = useField(\"message\");\nconst { value: reason } = useField(\"reason\");\n// select the initial reason\nreason.value = \"Advertising\";\n\nconst submittedContactInfo = ref(false);\n\nconst onSubmit = handleSubmit(async (values) => {\n const contactUsForm: ContactUs = {\n email: values.email,\n message: values.message,\n reason: values.reason,\n };\n\n if (contactUsService.contactUs(contactUsForm)) {\n submittedContactInfo.value = true;\n } else {\n logger.error(\"Could not submit form data\");\n }\n});\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", null, [\n _createElementVNode(\"main\", _hoisted_1, [\n _createElementVNode(\"div\", _hoisted_2, [\n _createElementVNode(\"div\", _hoisted_3, [\n _hoisted_4,\n _createTextVNode(\" To help your email get to the correct person, please complete the contact form below. \"),\n (submittedContactInfo.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_5, \" Thank you for contacting FamilyToday! Your request has been submitted. \"))\n : (_openBlock(), _createElementBlock(\"div\", _hoisted_6, [\n _createElementVNode(\"form\", {\n onSubmit: _cache[3] || (_cache[3] = \n//@ts-ignore\n(...args) => (_unref(onSubmit) && _unref(onSubmit)(...args))),\n id: \"about-us-form\"\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_unref(errors), (error) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: \"alert alert-danger\",\n role: \"alert\",\n key: error\n }, [\n _hoisted_7,\n _createTextVNode(\" \" + _toDisplayString(error), 1)\n ]))\n }), 128)),\n _withDirectives(_createElementVNode(\"input\", {\n type: \"email\",\n name: \"email\",\n placeholder: \"Enter email address\",\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => (_isRef(email) ? (email).value = $event : null))\n }, null, 512), [\n [_vModelText, _unref(email)]\n ]),\n _withDirectives(_createElementVNode(\"select\", {\n class: \"fc-preview-contextmenu\",\n name: \"reason\",\n \"onUpdate:modelValue\": _cache[1] || (_cache[1] = ($event: any) => (_isRef(reason) ? (reason).value = $event : null))\n }, _hoisted_15, 512), [\n [_vModelSelect, _unref(reason)]\n ]),\n _withDirectives(_createElementVNode(\"textarea\", {\n class: \"fc-preview-contextmenu\",\n name: \"message\",\n placeholder: \"Your message\",\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event: any) => (_isRef(message) ? (message).value = $event : null))\n }, null, 512), [\n [_vModelText, _unref(message)]\n ]),\n _hoisted_16\n ], 32)\n ]))\n ])\n ])\n ])\n ]))\n}\n}\n\n})","import script from \"./ContactUs.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./ContactUs.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__"],"names":["endpointBase","ContactUsService","constructor","logger","fetchService","this","advertiseWithUs","formData","name","title","phone","company","email","message","gRecaptchaResponse","Promise","resolve","post","then","response","ok","contactUs","reason","_hoisted_1","main","id","class","_hoisted_2","_hoisted_3","_hoisted_4","_createElementVNode","_hoisted_5","key","_hoisted_6","_hoisted_7","type","_hoisted_8","disabled","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","value","_defineComponent","__name","setup","__props","useLogger","inject","contactUsService","isRequired","isEmail","isOneOf","useValidators","validationSchema","handleSubmit","errors","useForm","useField","submittedContactInfo","ref","onSubmit","values","__awaiter","contactUsForm","error","_ctx","_cache","_openBlock","_createElementBlock","_createTextVNode","args","_unref","_Fragment","_renderList","role","_toDisplayString","_withDirectives","placeholder","$event","_isRef","_vModelText","_vModelSelect","__exports__"],"sourceRoot":""}