import{c as p}from"./AppLayout-5c633aaa.js";import{q as c,u as d,v as e,J as i,P as m,y as l,K as h,D as u}from"./vue-0d7ee8e8.js";import{_}from"./_plugin-vue_export-helper-b15b4a05.js";const g={props:{isPart:{type:Boolean,default:!1},strings:{type:Object,required:!0},regex:{type:String,required:!0},params:{type:Object,default(){return{}}}},data(){return{clearIcon:p,selected:this.params.hasOwnProperty("action")&&this.params.action?this.params.action:"puzzle-solver",leftPart:this.params.hasOwnProperty("left_part")&&this.params.left_part?this.params.left_part:"",rightPart:this.params.hasOwnProperty("right_part")&&this.params.right_part?this.params.right_part:"",word:this.params.hasOwnProperty("word")&&this.params.word?this.params.word:"",completion:this.params.hasOwnProperty("completion")&&this.params.completion?this.params.completion:"any"}},methods:{clear(a){this[a]=""}}},f=["action"],v=["innerHTML"],b={class:"relative w-full mb-3"},w=["innerHTML"],y=["innerHTML"],M=e("div",{class:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-4"},[e("div",{class:"icon icon-chevron-down"})],-1),x={key:0},T=["innerHTML"],H={class:"relative mb-3"},L=["pattern"],P=["src"],z=["innerHTML"],k={class:"relative mb-3"},O=["pattern"],V=["src"],q={key:1},C=["innerHTML"],I={class:"relative mb-3"},U=["pattern"],B=["src"],S=["innerHTML"],j={class:"relative w-full mb-3"},D=["innerHTML"],N=["innerHTML"],E=["innerHTML"],F=e("div",{class:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-4"},[e("div",{class:"icon icon-chevron-down"})],-1),J={class:"flex pt-3 px-3 justify-center"},K=["aria-label","innerHTML"];function A(a,n,t,G,s,o){return c(),d("form",{class:l("form "+(t.isPart?"transparent":"")+" bridge-form amp"),method:"get",action:a.route("bridge")},[e("div",{class:l(t.isPart?"":"md:p-3 py-3")},[e("h2",{class:"font-bold mt-3 mb-1",innerHTML:t.strings.options},null,8,v),e("div",b,[i(e("select",{class:"search-form-selection","onUpdate:modelValue":n[0]||(n[0]=r=>s.selected=r),name:"action"},[e("option",{value:"puzzle-solver",innerHTML:t.strings["bridge-puzzle-solver"]},null,8,w),e("option",{value:"word-finder",innerHTML:t.strings["bridge-word-finder"]},null,8,y)],512),[[m,s.selected]]),M]),s.selected==="puzzle-solver"?(c(),d("div",x,[e("label",{class:l("form-label "+(t.isPart?"":"text-center")),innerHTML:t.strings["left-part-of-the-word-label"]},null,10,T),e("div",H,[i(e("input",{type:"text",class:"input !pe-10",name:"left_part",pattern:"["+t.regex+"]+","onUpdate:modelValue":n[1]||(n[1]=r=>s.leftPart=r),minlength:"2",maxlength:"30",required:""},null,8,L),[[h,s.leftPart]]),e("img",{onClick:n[2]||(n[2]=r=>o.clear("leftPart")),src:s.clearIcon,width:"13.5",height:"18.4",class:"typeahead-clear",alt:"clear"},null,8,P)]),e("label",{class:l("form-label "+(t.isPart?"":"text-center")),innerHTML:t.strings["right-part-of-the-word-label"]},null,10,z),e("div",k,[i(e("input",{type:"text",class:"input !pe-10",name:"right_part",pattern:"["+t.regex+"]+","onUpdate:modelValue":n[3]||(n[3]=r=>s.rightPart=r),minlength:"2",maxlength:"30",required:""},null,8,O),[[h,s.rightPart]]),e("img",{onClick:n[4]||(n[4]=r=>o.clear("leftPart")),src:s.clearIcon,width:"13.5",height:"18.4",class:"typeahead-clear",alt:"clear"},null,8,V)])])):u("",!0),s.selected==="word-finder"?(c(),d("div",q,[e("label",{class:l("form-label "+(t.isPart?"":"text-center")),innerHTML:t.strings["bridge-word-label"]},null,10,C),e("div",I,[i(e("input",{type:"text",class:"input !pe-10",name:"word",pattern:"["+t.regex+"]+","onUpdate:modelValue":n[5]||(n[5]=r=>s.word=r),minlength:"2",maxlength:"30",required:""},null,8,U),[[h,s.word]]),e("img",{onClick:n[6]||(n[6]=r=>o.clear("leftPart")),src:s.clearIcon,width:"13.5",height:"18.4",class:"typeahead-clear",alt:"clear"},null,8,B)]),e("label",{class:l("form-label "+(t.isPart?"":"text-center")),innerHTML:t.strings["completion-label"]},null,10,S),e("div",j,[i(e("select",{class:"search-form-selection","onUpdate:modelValue":n[7]||(n[7]=r=>s.completion=r),name:"completion"},[e("option",{value:"any",innerHTML:t.strings.any},null,8,D),e("option",{value:"left",innerHTML:t.strings.left},null,8,N),e("option",{value:"right",innerHTML:t.strings.right},null,8,E)],512),[[m,s.completion]]),F])])):u("",!0)],2),e("div",J,[e("button",{type:"submit",class:"button search","aria-label":t.strings.search,innerHTML:t.strings.search},null,8,K)])],10,f)}const X=_(g,[["render",A]]);export{X as S};