import{i as m,o as s,w as R,b as l,e as f,u as t,K as a,d,h as v,c as i,F as y,g as w,n as h,t as p,j as u,f as b}from"./app-B4kV47qU.js";import{_ as g}from"./Modal-ChMy0A7y.js";import{u as q}from"./chatStore-CTtmOQOw.js";import{u as C}from"./modalStore-BgORG3Nn.js";import"./toastComposable-CvcyPmJb.js";import"./echoServiceComposable-n1MnmRL6.js";const x={class:"group mb-2 mt-3 flex items-center rounded-lg"},M={class:"styled-scrollbar max-h-[560px] space-y-2 overflow-y-auto"},S={class:"mt-1 h-[22rem]"},I=["onClick"],Q=["onClick"],_={key:1,class:"text-center text-gray-700"},V={__name:"QuickReplyModal",setup(A){const e=q();return C(),(c,r)=>(s(),m(g,{"header-state":!0,"header-title":"Quick reply",state:"quickReplyModal"},{default:R(()=>[l("div",x,[f(l("input",{type:"text",placeholder:"Search quick reply templates","onUpdate:modelValue":r[0]||(r[0]=o=>t(e).quickReplySearchInput=o),onKeydown:[r[1]||(r[1]=a((...o)=>t(e).onArrowDown&&t(e).onArrowDown(...o),["down"])),r[2]||(r[2]=a((...o)=>t(e).onArrowUp&&t(e).onArrowUp(...o),["up"])),r[3]||(r[3]=a(d((...o)=>t(e).selectQuickReply&&t(e).selectQuickReply(...o),["prevent"]),["enter"])),r[4]||(r[4]=a(d((...o)=>t(e).selectQuickReply&&t(e).selectQuickReply(...o),["prevent"]),["tab"]))],onKeyup:r[5]||(r[5]=a((...o)=>t(e).quickReplyModalClose&&t(e).quickReplyModalClose(...o),["esc"])),class:"input",ref:t(e).quickReplyModalSearchInput},null,544),[[v,t(e).quickReplySearchInput]])]),l("div",M,[l("div",S,[t(e).quickReplyFilteredItems.length>0?(s(!0),i(y,{key:0},w(t(e).quickReplyFilteredItems,(o,n)=>(s(),i("div",{onClick:k=>t(e).addQuickReplyToMessageInput(o),key:n},[(s(),i("div",{class:h(["my-1 cursor-pointer rounded border px-1 py-2 text-sm shadow-sm hover:border-primary-300 hover:bg-primary-100 dark:bg-dark-700 dark:hover:bg-opacity-80",{"border border-primary-300 bg-primary-50":t(e).arrowCounter==n}]),key:n,onClick:k=>t(e).addQuickReplyToMessageInput(o)},p(o),11,Q))],8,I))),128)):(s(),i("div",_,[u(p(c.trans("No record found"))+" ",1),t(e).quickReplySearchInput?(s(),i(y,{key:0},[r[6]||(r[6]=u(' for "',-1)),l("b",null,p(t(e).quickReplySearchInput),1),r[7]||(r[7]=u('" ',-1))],64)):b("",!0)]))])])]),_:1}))}};export{V as default};
