import{_ as b}from"./index-CwP5gtrp-D2vs7vDd.js";import{_ as g,d as $,o as n,a as l,b as a,e as i,t as r,w as s,j as S,c as y,h as v}from"./index-D02r7Zsc.js";import{_ as M}from"./BContainer.vue_vue_type_script_setup_true_lang-Bi1hGl0B-Bd4Gid1V.js";import{_ as V}from"./BForm.vue_vue_type_script_setup_true_lang-u44ElAm9-BpNSPhCc.js";import{_ as w}from"./BButton.vue_vue_type_script_setup_true_lang-D5Eg7-Zv-DDRCX2AG.js";import{_ as R}from"./BFormGroup.vue_vue_type_script_setup_true_lang-BmZN8qcE-Cpaz2jd5.js";import{_ as k}from"./BFormCheckboxGroup.vue_vue_type_script_setup_true_lang-CZ2qJTp0-lrA37oyN.js";import{_ as D}from"./BFormInput.vue_vue_type_script_setup_true_lang-B9E5yJEs-DBdCBfsp.js";import"./index-C0p9vHHI-DoOEDIMw.js";import"./getElement-DrDVR-jO-jZgQ3Xxs.js";import"./BCloseButton.vue_vue_type_script_setup_true_lang-byZmQ_ot-CWP55Z5N.js";import"./useDefaults-DESCdb0p-CFLjYrdG.js";import"./useId-t29UARy6-BH5d2231.js";import"./dom-DVb-f0ZG-Crdf0-mU.js";import"./useColorVariantClasses-ZDE19TZw-Cvu7SygP.js";import"./useShowHide-717t6y_D-BZTBbOpd.js";import"./classes-BW_GpXTu-AKwVND4h.js";import"./BSpinner.vue_vue_type_script_setup_true_lang-H1MzHypA-D8AXjJB0.js";import"./BLink.vue_vue_type_script_setup_true_lang-Ct47WhzE-DDPYis_D.js";import"./object-0ALvRU0O-3BORTTD-.js";import"./stringUtils-gJJ6T6UC-g5BZrMym.js";import"./useStateClass-BGbSLWFN-BcKQ8Z3i.js";import"./BCol.vue_vue_type_script_setup_true_lang-D0xTJQ30-C8E8teuV.js";import"./getClasses-CsgNQabU-zDOdZIGY.js";import"./BFormValidFeedback.vue_vue_type_script_setup_true_lang-D5WYd1j7-BqGw1a2-.js";import"./ConditionalWrapper.vue_vue_type_script_lang-IX_NpHH--DrWkD0m2.js";const B={data:function(){return{searchTerm:"",localisedSearch:!1,noResultModalData:{show:!1,message:"",title:""}}},created:function(){this.getConfig().localized_empr==0?this.localisedSearch=!1:parseInt(this.getConfig().applimobile_simple_search_localised)==1&&(this.localisedSearch=!0)},methods:{async request(){this.publish("showOverlay",!0);let e=await this.getModule("search").sendSimpleSearch(this.get("sessionId"),this.searchTerm,this.localisedSearch);if(!e){this.publish("showOverlay",!1),this.noResultModalData=this.getModule("search").noResultModal(this.$t("search.noResultModal.message"),this.$t("search.noResultModal.title"));return}this.$router.push({name:"searchresult",params:{searchId:e}})}}},C={class:"d-flex justify-content-around align-items-baseline mb-2"},T={class:"h3 title text-center text-secondary"},I={class:"d-flex"};function N(e,t,q,z,O,m){const d=D,p=k,u=R,c=w,h=V,f=M,_=b;return n(),$("div",null,[l("div",C,[t[5]||(t[5]=l("i",{class:"bi bi-binoculars text-gray","aria-hidden":"true",style:{"font-size":"1.7rem"}},null,-1)),l("h1",T,r(e.$t("menusLabels.simpleSearch.full")),1),t[6]||(t[6]=i("   ",-1))]),a(f,{fluid:"sm"},{default:s(()=>[a(h,{onSubmit:t[2]||(t[2]=S(o=>m.request(),["prevent"]))},{default:s(()=>[a(u,null,{default:s(()=>[a(d,{required:"",type:"search",class:"my-4",modelValue:e.searchTerm,"onUpdate:modelValue":t[0]||(t[0]=o=>e.searchTerm=o),placeholder:e.$t("simpleSearch.simpleSearchPlaceholder")},null,8,["modelValue","placeholder"]),e.getConfig().localized_empr>0?(n(),y(p,{key:0,modelValue:e.localisedSearch,"onUpdate:modelValue":t[1]||(t[1]=o=>e.localisedSearch=o),switch:""},{default:s(()=>[i(r(e.$t("simpleSearch.localisedSearchCheckboxCaption")),1)]),_:1},8,["modelValue"])):v("",!0)]),_:1}),l("div",I,[a(c,{class:"ms-auto me-3",variant:"outline-third",type:"submit"},{default:s(()=>[i(r(e.$t("simpleSearch.searchButton")),1)]),_:1})])]),_:1})]),_:1}),a(_,{modelValue:e.noResultModalData.show,"onUpdate:modelValue":t[3]||(t[3]=o=>e.noResultModalData.show=o),title:e.noResultModalData.title,centered:"","no-header-close":"","header-bg-variant":"info","header-class":"text-light title","body-bg-variant":"light","footer-bg-variant":"light","ok-variant":"outline-info","ok-only":"",onOk:t[4]||(t[4]=o=>e.noResultModalData.show=!1)},{default:s(()=>[i(r(e.noResultModalData.message),1)]),_:1},8,["modelValue","title"])])}const me=g(B,[["render",N]]);export{me as default};
