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,EAAAA,oBAAoB,MAAOL,EAAY,EACrCK,EAAAA,EAAAA,oBAAoB,OAAQ,CAC1BmB,UAAUQ,EAAAA,EAAAA,eAAeR,EAAU,CAAC,YACpCvB,MAAO,8BACPkC,KAAM,SACNrC,GAAI,UACH,EACDO,EAAAA,EAAAA,oBAAoB,MAAOF,EAAY,EACrCiC,EAAAA,EAAAA,iBAAgB/B,EAAAA,EAAAA,oBAAoB,QAAS,CAC3CC,KAAM,SACN,sBAAuBsB,EAAO,KAAOA,EAAO,GAAMS,GAAkBtB,EAAaR,MAAQ8B,GACzFF,KAAM,IACNlC,MAAO,eACPqC,YAAa,mBACbP,QAASH,EAAO,KAAOA,EAAO,IAAKI,EAAAA,EAAAA,gBAAe,QAAU,CAAC,WAC5D,KAAM,KAAM,CACb,CAACO,EAAAA,WAAaxB,EAAYR,SAE5BH,KAED,GAAIF,MAER,OAGP,ICxFA,MAAMsC,EAAc,EAEpB,O","sources":["webpack://beliefnet-frontend/./src/components/search/SearchBar.vue?8c2c","webpack://beliefnet-frontend/./src/components/search/SearchBar.vue"],"sourcesContent":["import { defineComponent as _defineComponent } from 'vue'\nimport { withModifiers as _withModifiers, createElementVNode as _createElementVNode, vModelText as _vModelText, withDirectives as _withDirectives, openBlock as _openBlock, createElementBlock as _createElementBlock } from \"vue\"\n\nconst _hoisted_1 = { id: \"header-searchbar\" }\nconst _hoisted_2 = [\"onClick\"]\nconst _hoisted_3 = { class: \"container\" }\nconst _hoisted_4 = [\"onSubmit\"]\nconst _hoisted_5 = { class: \"input-group\" }\nconst _hoisted_6 = /*#__PURE__*/_createElementVNode(\"span\", { class: \"input-group-btn\" }, [\n /*#__PURE__*/_createElementVNode(\"input\", {\n type: \"submit\",\n class: \"btn btn-accent-2\",\n value: \"Search\"\n })\n], -1)\n\nimport { ref } from 'vue';\n\n\nexport default /*#__PURE__*/_defineComponent({\n __name: 'SearchBar',\n setup(__props) {\n\nconst searchToggleElement = ref(null);\nconst searchBarElement = ref(null);\nconst searchParam = ref('');\n\nconst toggleSearchBar = function () {\n if (!searchToggleElement.value || !searchBarElement.value) return;\n\n const searchToggle = searchToggleElement.value;\n const searchBar = searchBarElement.value;\n\n // Toggle collapsed class\n searchToggle.classList.toggle('collapsed');\n\n // Toggle in class\n searchBar.classList.toggle('in');\n\n // Toggle aria-expanded attribute for search toggle element\n searchToggle.setAttribute('aria-expanded', String(searchToggle.classList.contains('collapsed')));\n\n // Toggle aria-expanded attribute for search bar element\n searchBar.setAttribute('aria-expanded', String(searchBar.classList.contains('in')));\n};\n\nconst onSubmit = function () {\n location.href = '/search/site?q=' + searchParam.value;\n};\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"span\", _hoisted_1, [\n _createElementVNode(\"a\", {\n onClick: _withModifiers(toggleSearchBar, [\"stop\"]),\n ref_key: \"searchToggleElement\",\n ref: searchToggleElement,\n class: \"header-search-toggle\",\n role: \"button\",\n \"aria-expanded\": \"false\",\n \"aria-controls\": \"collapseExample\"\n }, null, 8, _hoisted_2),\n _createElementVNode(\"div\", {\n ref_key: \"searchBarElement\",\n ref: searchBarElement,\n class: \"collapse header-search-toggle-bar\"\n }, [\n _createElementVNode(\"div\", _hoisted_3, [\n _createElementVNode(\"form\", {\n onSubmit: _withModifiers(onSubmit, [\"prevent\"]),\n class: \"col-sm-6 header-search-form\",\n name: \"search\",\n id: \"search\"\n }, [\n _createElementVNode(\"div\", _hoisted_5, [\n _withDirectives(_createElementVNode(\"input\", {\n type: \"search\",\n \"onUpdate:modelValue\": _cache[0] || (_cache[0] = ($event: any) => ((searchParam).value = $event)),\n name: \"q\",\n class: \"form-control\",\n placeholder: \"Search Beliefnet\",\n onClick: _cache[1] || (_cache[1] = _withModifiers(() => {}, [\"stop\"]))\n }, null, 512), [\n [_vModelText, searchParam.value]\n ]),\n _hoisted_6\n ])\n ], 40, _hoisted_4)\n ])\n ], 512)\n ]))\n}\n}\n\n})","import script from \"./SearchBar.vue?vue&type=script&setup=true&lang=ts\"\nexport * from \"./SearchBar.vue?vue&type=script&setup=true&lang=ts\"\n\nconst __exports__ = script;\n\nexport default __exports__"],"names":["_hoisted_1","id","_hoisted_2","_hoisted_3","class","_hoisted_4","_hoisted_5","_hoisted_6","_createElementVNode","type","value","_defineComponent","__name","setup","__props","searchToggleElement","ref","searchBarElement","searchParam","toggleSearchBar","searchToggle","searchBar","classList","toggle","setAttribute","String","contains","onSubmit","location","href","_ctx","_cache","_openBlock","_createElementBlock","onClick","_withModifiers","ref_key","role","name","_withDirectives","$event","placeholder","_vModelText","__exports__"],"sourceRoot":""}