module.exports=[4510,a=>{"use strict";a.s(["default",()=>e]);var b=a.i(87924),c=a.i(32886),d=a.i(2198);let e=({data:a})=>{let e="ar"===(0,c.useLocale)();return(0,b.jsx)("div",{className:"w-full px-5 sm:px-10 mt-10",children:(0,b.jsx)("div",{className:"   grid   gap-6   sm:grid-cols-1   md:grid-cols-2   lg:grid-cols-3   xl:grid-cols-4   ",children:a.map((a,c)=>(0,b.jsx)("div",{className:"flex  justify-center w-full",children:(0,b.jsx)(d.default,{item:{...a,id:a.id},isArabic:e,isFirst:0===c})},a.id))})})}},84850,a=>{"use strict";a.s(["Autoplay",()=>b.default]);var b=a.i(34494)},13101,a=>{"use strict";a.s(["default",()=>j]);var b=a.i(87924),c=a.i(32886),d=a.i(70388),e=a.i(46964),f=a.i(46271),g=a.i(91858);a.i(9068);var h=a.i(50416),i=a.i(84850);let j=()=>{let a="ar"===(0,c.useLocale)(),{data:j,isLoading:k,isError:l}=(0,e.useGetAllDoctors)({sort:"highest_rating"});if(k)return(0,b.jsx)("div",{className:"py-6 sm:py-8",children:(0,b.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6",children:[1,2,3].map(a=>(0,b.jsx)("div",{className:"w-full h-64 rounded-2xl bg-gray-200 animate-pulse"},a))})});if(l)return(0,b.jsx)("div",{className:"text-center py-10 text-red-500",children:a?"حدث خطأ أثناء تحميل الأطباء.":"Failed to load doctors."});let m=j?.data||[];return(0,b.jsxs)("div",{className:`py-6 sm:py-8 ${a?"rtl":"ltr"}`,children:[(0,b.jsx)(g.Swiper,{modules:[h.Pagination,i.Autoplay],pagination:{clickable:!0},autoplay:{delay:3e3},navigation:!1,spaceBetween:20,className:"pb-10",breakpoints:{0:{slidesPerView:1},640:{slidesPerView:2},1024:{slidesPerView:3}},dir:a?"rtl":"ltr",children:m.map((c,e)=>(0,b.jsx)(g.SwiperSlide,{children:(0,b.jsx)(f.motion.div,{initial:{opacity:0,y:40},whileInView:{opacity:1,y:0},transition:{delay:.1*e,duration:.4,ease:"easeOut"},viewport:{once:!0},className:"h-full",children:(0,b.jsx)(d.default,{doctor:c,isArabic:a})})},c.id))}),(0,b.jsx)("style",{children:`
          /* المسافة بين الكروت والنقاط */
          .swiper-pagination {
            margin-top: 25px !important;
            position: relative !important;
          }

          /* جميع النقاط */
          .swiper-pagination-bullet {
            background-color: #CCCCCC !important;
            width: 10px !important;
            height: 10px !important;
            border-radius: 6px !important;
            opacity: 1 !important;
            transition: 0.3s;
          }

          /* النقطة الفعّالة */
          .swiper-pagination-bullet-active {
            background-color: #2F537D !important;
            width: 22px !important;
            border-radius: 6px !important;
          }

          /* 🔥 إظهار أول 5 نقاط فقط */
          .swiper-pagination-bullet:nth-child(n+6) {
            display: none !important;
          }
        `})]})}},40461,a=>{"use strict";a.s(["default",()=>o],40461);var b=a.i(87924),c=a.i(72131),d=a.i(91858);a.i(9068);var e=a.i(71548),e=e,f=a.i(84850),g=a.i(32886),h=a.i(9610),i=a.i(99889),j=a.i(38246),k=a.i(71987),l=a.i(46964),m=a.i(31173),n=a.i(46271);let o=()=>{let a="ar"===(0,g.useLocale)(),o=(0,h.useTranslations)("HomePage"),p=(0,c.useRef)(null),q=(0,c.useRef)(null),[r,s]=(0,c.useState)(0);(0,c.useEffect)(()=>{s(window.innerWidth);let a=()=>s(window.innerWidth);return window.addEventListener("resize",a),()=>window.removeEventListener("resize",a)},[]);let{data:t,isLoading:u}=(0,l.useGetAllSectors)(),v=t?.data||[],[w,x]=(0,c.useState)(null),[y,z]=(0,c.useState)(0);(0,c.useEffect)(()=>{v.length>0&&null===w&&x(v[0].id)},[v,w]);let{data:A,isLoading:B,isFetching:C}=(0,l.useGetSectionsBySector)(w),D=A?.data||[],E=()=>(0,b.jsx)("div",{className:"w-32 h-3 bg-gray-300 rounded-full animate-pulse"}),F=()=>(0,b.jsx)("div",{className:"h-44 w-40 bg-gray-200 rounded-xl shadow-sm animate-pulse"}),G={modules:[e.default,f.Autoplay],spaceBetween:4,slidesPerView:6,navigation:{nextEl:a?".sector-swiper-next":".sector-swiper-prev",prevEl:a?".sector-swiper-prev":".sector-swiper-next"},onSwiper:a=>p.current=a,breakpoints:{1024:{slidesPerView:7,spaceBetween:2},768:{slidesPerView:5,spaceBetween:2},480:{slidesPerView:3,spaceBetween:2},0:{slidesPerView:2,spaceBetween:2}}},H={modules:[e.default,f.Autoplay],spaceBetween:10,slidesPerView:Math.min(6,D.length||1),autoplay:{delay:2500,disableOnInteraction:!1},speed:800,navigation:{nextEl:a?".section-swiper-next":".section-swiper-prev",prevEl:a?".section-swiper-prev":".section-swiper-next"},onSwiper:a=>q.current=a,onSlideChange:a=>z(a.activeIndex),breakpoints:{1024:{slidesPerView:Math.min(6,D.length||1)},768:{slidesPerView:Math.min(4,D.length||1)},480:{slidesPerView:Math.min(3,D.length||1)},0:{slidesPerView:Math.min(2,D.length||1)}}},I={hidden:{opacity:0,y:20},visible:a=>({opacity:1,y:0,transition:{delay:.05*a,duration:.4}})};return(0,b.jsx)("div",{className:"w-full py-4",children:(0,b.jsxs)("div",{className:"container mx-auto",children:[(0,b.jsxs)("div",{className:"flex my-5 items-center justify-between",children:[(0,b.jsxs)("h2",{className:"text-xl flex items-center gap-1",children:[(0,b.jsx)("span",{className:"text-blue-600",children:(0,b.jsx)(k.default,{src:"/icons/Notes.png",alt:"sectors",width:25,height:25})}),o("sectors")]}),(0,b.jsxs)("div",{className:"flex gap-4",children:[(0,b.jsx)("button",{className:"sector-swiper-prev w-6 h-6 flex items-center justify-center rounded-full bg-blue-900 text-white hover:bg-blue-800",children:a?(0,b.jsx)(m.IoMdArrowForward,{size:18}):(0,b.jsx)(m.IoMdArrowBack,{size:18})}),(0,b.jsx)("button",{className:"sector-swiper-next w-6 h-6 flex items-center justify-center rounded-full border border-gray-300 text-gray-500 hover:bg-gray-100",children:a?(0,b.jsx)(m.IoMdArrowBack,{size:18}):(0,b.jsx)(m.IoMdArrowForward,{size:18})})]})]}),(0,b.jsx)("div",{children:u?(0,b.jsx)("div",{className:"flex justify-between overflow-x-auto py-2 gap-4",children:Array(r>=1024?7:r>=768?5:r>=480?3:2).fill(0).map((a,c)=>(0,b.jsx)(E,{},c))}):(0,b.jsx)(d.Swiper,{...G,children:v.map((a,c)=>(0,b.jsx)(d.SwiperSlide,{children:(0,b.jsx)(n.motion.div,{onClick:()=>x(a.id),className:"flex justify-center text-[12px] cursor-pointer py-2",initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.05*c},children:(0,b.jsx)("span",{className:`${w===a.id?"text-[#2F537D] border-b-2 border-[#2F537D] font-semibold":"text-black"} text-sm md:text-base truncate`,title:a.name,children:a.name})})},a.id))})}),(0,b.jsxs)("div",{className:"flex my-5 items-center justify-between px-2",children:[(0,b.jsx)("h2",{className:"text-xl flex items-center gap-1",children:(0,b.jsxs)(j.default,{href:"/sections",className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"text-blue-600",children:(0,b.jsx)(k.default,{src:"/icons/category-2.png",alt:"sections",width:25,height:25})}),o("sections")]})}),(0,b.jsxs)("div",{className:"flex gap-4",children:[(0,b.jsx)("button",{className:"section-swiper-prev w-6 h-6 flex items-center justify-center rounded-full bg-blue-900 text-white hover:bg-blue-800",children:a?(0,b.jsx)(m.IoMdArrowForward,{size:18}):(0,b.jsx)(m.IoMdArrowBack,{size:18})}),(0,b.jsx)("button",{className:"section-swiper-next w-6 h-6 flex items-center justify-center rounded-full border border-gray-300 text-gray-500 hover:bg-gray-100",children:a?(0,b.jsx)(m.IoMdArrowBack,{size:18}):(0,b.jsx)(m.IoMdArrowForward,{size:18})})]})]}),(0,b.jsx)("div",{className:"relative",children:B||C?(0,b.jsx)("div",{className:"flex justify-center items-center gap-6 flex-wrap",children:Array(r>=1024?6:r>=768?4:r>=480?3:2).fill(0).map((a,c)=>(0,b.jsx)(F,{},c))}):D.length>0?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(d.Swiper,{...H,children:D.map((a,c)=>(0,b.jsx)(d.SwiperSlide,{children:(0,b.jsx)(n.motion.div,{custom:c,variants:I,initial:"hidden",animate:"visible",children:(0,b.jsx)(i.default,{id:a.id,name:a.name,icon:a.icon||"/logo.png"})})},a.id))}),(0,b.jsx)("div",{className:"absolute -bottom-12 left-1/2 -translate-x-1/2 flex items-center gap-2 px-4 py-2",children:D.map((a,c)=>(0,b.jsx)("button",{onClick:()=>q.current?.slideTo(c),className:`h-2 rounded-full transition-all duration-300 ${c===y?"bg-[#2F537D] w-6":"bg-gray-300 w-2"}`},c))})]}):(0,b.jsx)("div",{className:"text-center py-8 text-gray-500",children:o("noSections")})})]})})}},62067,a=>{"use strict";a.s(["default",()=>e]);var b=a.i(87924),c=a.i(71987),d=a.i(38246);function e({item:a}){return(0,b.jsx)(d.default,{href:`/hospital/${a.id}`,children:(0,b.jsxs)("div",{className:"   w-full    h-[250px]    flex flex-col    items-center    justify-center    text-center    bg-white    shadow-md    rounded-3xl    p-6    hover:shadow-lg    transition-shadow    duration-300   ",children:[(0,b.jsx)("div",{className:"relative w-20 h-20 rounded-full border border-gray-200 shadow-sm overflow-hidden",children:(0,b.jsx)(c.default,{src:a.image||"/placeholder.jpg",alt:a.title,fill:!0,className:"object-cover",sizes:"(max-width: 80px) 100vw, 80px"})}),(0,b.jsx)("h3",{className:"mt-4 text-lg font-semibold text-gray-800",children:a.title}),(0,b.jsx)("p",{className:"mt-1 text-md text-[#3469CC] bg-[#DAE5F1] px-3 py-1 rounded-md",children:a.type})]})})}},10813,a=>{"use strict";a.s(["default",()=>f]);var b=a.i(87924),c=a.i(91858);a.i(9068);var d=a.i(84850),e=a.i(71987);let f=()=>(0,b.jsx)("div",{className:"w-full py-6",children:(0,b.jsx)(c.Swiper,{modules:[d.Autoplay],autoplay:{delay:2e3,disableOnInteraction:!1},loop:!0,spaceBetween:20,breakpoints:{320:{slidesPerView:2},480:{slidesPerView:3},640:{slidesPerView:4},768:{slidesPerView:5},1024:{slidesPerView:6}},children:[{id:1,src:"/icons/credit_card_mini 1.png",alt:"Visa"},{id:2,src:"/icons/cod_mini 1.png",alt:"COD"},{id:3,src:"/icons/stc_pay_mini 1.png",alt:"STC Pay"},{id:4,src:"/icons/apple_pay_mini 1.png",alt:"Apple Pay"},{id:5,src:"/icons/google_pay_mini 1.png",alt:"Google Pay"},{id:6,src:"/icons/sbc 1.png",alt:"STC Pay"},{id:7,src:"/icons/mada_mini 1.png",alt:"Mada"},{id:8,src:"/icons/emkan_installment_mini 1.png",alt:"Emkan Installment"}].map(a=>(0,b.jsx)(c.SwiperSlide,{children:(0,b.jsx)("div",{className:"flex items-center justify-center my-2 h-16 w-32 rounded-full bg-gray-100 shadow-sm transition-transform duration-300 hover:scale-105",children:(0,b.jsx)(e.default,{src:a.src,alt:a.alt,width:60,height:60,className:"object-contain"})})},a.id))})})},46003,a=>{"use strict";a.s(["default",()=>m],46003);var b=a.i(87924),c=a.i(72131),d=a.i(42343);function e(a){return(0,d.GenIcon)({tag:"svg",attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M20.25 8.511c.884.284 1.5 1.128 1.5 2.097v4.286c0 1.136-.847 2.1-1.98 2.193-.34.027-.68.052-1.02.072v3.091l-3-3c-1.354 0-2.694-.055-4.02-.163a2.115 2.115 0 0 1-.825-.242m9.345-8.334a2.126 2.126 0 0 0-.476-.095 48.64 48.64 0 0 0-8.048 0c-1.131.094-1.976 1.057-1.976 2.192v4.286c0 .837.46 1.58 1.155 1.951m9.345-8.334V6.637c0-1.621-1.152-3.026-2.76-3.235A48.455 48.455 0 0 0 11.25 3c-2.115 0-4.198.137-6.24.402-1.608.209-2.76 1.614-2.76 3.235v6.226c0 1.621 1.152 3.026 2.76 3.235.577.075 1.157.14 1.74.194V21l4.155-4.155"},child:[]}]})(a)}function f(a){return(0,d.GenIcon)({tag:"svg",attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"m18.375 12.739-7.693 7.693a4.5 4.5 0 0 1-6.364-6.364l10.94-10.94A3 3 0 1 1 19.5 7.372L8.552 18.32m.009-.01-.01.01m5.699-9.941-7.81 7.81a1.5 1.5 0 0 0 2.112 2.13"},child:[]}]})(a)}var g=a.i(48617),h=a.i(46271),i=a.i(62036),j=a.i(28337),k=a.i(32886),l=a.i(9610);let m=()=>{let a="ar"===(0,k.useLocale)(),d=(0,l.useTranslations)("supportChat"),m=(0,j.createApiClient)(),[n,o]=(0,c.useState)(!1),[p,q]=(0,c.useState)(""),[r,s]=(0,c.useState)([]),[t,u]=(0,c.useState)(null),[v,w]=(0,c.useState)([]),[x,y]=(0,c.useState)(!1),[z,A]=(0,c.useState)(!1),B=(0,c.useRef)(null),C=(0,c.useRef)(null),D=(0,c.useRef)(null),E=(0,c.useRef)(null),[F,G]=(0,c.useState)({x:0,y:0,width:0,height:0}),H=()=>{if(D.current){let a=D.current.getBoundingClientRect();G({x:a.left+a.width/2,y:a.top+a.height/2,width:a.width,height:a.height})}};(0,c.useEffect)(()=>(H(),window.addEventListener("resize",H),()=>window.removeEventListener("resize",H)),[]),(0,c.useEffect)(()=>{B.current?.scrollIntoView({behavior:"smooth"})},[r]);let I=async()=>{try{A(!0);let a=await m.get("/support/chats");console.log("Chats response:",a.data),a.data.data&&a.data.data.id?(u(a.data.data),await K(a.data.data.id)):await J()}catch(a){console.error("Error initializing chat:",a),await J()}finally{A(!1)}},J=async()=>{try{console.log("Starting new chat...");let a=await m.post("/support/chats",{});console.log("New chat response:",a.data),a.data.data&&u(a.data.data)}catch(a){console.error("Error starting new chat:",a)}},K=async a=>{try{if(console.log("Loading messages for conversation:",a),!a)return void console.error("No conversation ID provided");let b=await m.get(`/support/chats/${a}`);console.log("Messages response:",b.data),b.data.data&&s(b.data.data)}catch(a){console.error("Error loading messages:",a)}},L=async()=>{if((p.trim()||0!==v.length)&&t)try{y(!0);let a=new FormData;a.append("conversation_id",String(t.id)),p.trim()&&a.append("body",p),v.forEach(b=>{a.append("attachments[]",b)}),console.log("Sending message with data:",{conversation_id:t.id,body:p,attachments:v.length});let b=await m.post("/support/chats/messages",a,{headers:{"Content-Type":"multipart/form-data"}});console.log("Message sent successfully:",b.data),b.data.data&&(s(a=>[...a,b.data.data]),q(""),w([]))}catch(a){console.error("Error sending message:",a),a.response&&(console.error("Error response data:",a.response.data),console.error("Error response status:",a.response.status))}finally{y(!1)}},M=async()=>{H(),o(!0),t?await K(t.id):await I()};return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(h.motion.div,{ref:D,onClick:M,className:"fixed bottom-6 right-6 w-16 h-16 rounded-full cursor-pointer bg-gradient-to-r from-[#2F537D] to-[#4A76A8] flex justify-center items-center text-white shadow-2xl z-[999]",whileHover:{scale:1.1,boxShadow:"0 10px 25px rgba(47, 83, 125, 0.4)"},whileTap:{scale:.9},initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:200,damping:15},children:[(0,b.jsx)(e,{className:"text-2xl"}),t?.unread_count&&t.unread_count>0?(0,b.jsx)(h.motion.div,{className:"absolute -top-1 -right-1 w-4 h-4 bg-red-500 rounded-full flex items-center justify-center text-xs",animate:{scale:[1,1.2,1]},transition:{repeat:1/0,duration:2},children:t.unread_count}):null]}),(0,b.jsx)(i.AnimatePresence,{children:n&&(0,b.jsx)(h.motion.div,{className:"fixed inset-0 bg-black/40 backdrop-blur-sm flex justify-center items-center z-[1000] p-4",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:()=>o(!1),children:(0,b.jsxs)(h.motion.div,{className:"bg-white w-full max-w-md rounded-2xl shadow-2xl overflow-hidden flex flex-col h-[80vh] max-h-[600px]",initial:{scale:.1,opacity:0,x:F.x-window.innerWidth/2,y:F.y-window.innerHeight/2,width:F.width,height:F.height,borderRadius:"50%"},animate:{scale:1,opacity:1,x:0,y:0,width:"100%",height:"80vh",maxHeight:"600px",borderRadius:"1rem"},exit:{scale:.1,opacity:0,x:F.x-window.innerWidth/2,y:F.y-window.innerHeight/2,width:F.width,height:F.height,borderRadius:"50%",transition:{duration:.3}},transition:{type:"spring",stiffness:300,damping:25,duration:.5},onClick:a=>a.stopPropagation(),children:[(0,b.jsx)(h.motion.div,{className:"bg-gradient-to-r from-[#2F537D] to-[#4A76A8] p-4 text-white",initial:{opacity:0},animate:{opacity:1},transition:{delay:.2},children:(0,b.jsxs)("div",{className:"flex items-center justify-between",children:[(0,b.jsxs)("div",{className:"flex items-center gap-3",children:[(0,b.jsx)(h.motion.div,{className:"w-10 h-10 rounded-full bg-white/20 flex items-center justify-center",initial:{scale:0},animate:{scale:1},transition:{delay:.3,type:"spring"},children:(0,b.jsx)(e,{className:"text-xl"})}),(0,b.jsxs)(h.motion.div,{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{delay:.4},children:[(0,b.jsx)("h2",{className:"text-lg font-semibold",children:t?.peer?.name||d("customerService")}),(0,b.jsx)("p",{className:"text-xs opacity-80",children:d(t?.peer?.role==="admin"?"supportManager":"weAreHereToHelp")})]})]}),(0,b.jsx)(h.motion.button,{onClick:()=>o(!1),className:"text-white hover:bg-white/20 p-1 rounded-full transition-colors",initial:{scale:0,rotate:-180},animate:{scale:1,rotate:0},transition:{delay:.5,type:"spring"},children:(0,b.jsx)(g.IoClose,{className:"text-2xl"})})]})}),(0,b.jsx)("div",{className:"flex-1 overflow-y-auto p-4 bg-gray-50",children:z?(0,b.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,b.jsx)("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-[#2F537D]"})}):(0,b.jsxs)(h.motion.div,{className:"space-y-4",initial:{opacity:0},animate:{opacity:1},transition:{delay:.6},children:[0===r.length?(0,b.jsxs)("div",{className:"text-center text-gray-500 py-8",children:[(0,b.jsx)(e,{className:"text-4xl mx-auto mb-2 opacity-50"}),(0,b.jsx)("p",{children:d("startNewConversation")}),(0,b.jsx)("p",{className:"text-sm mt-2 text-gray-400",children:d("writeYourFirstMessage")})]}):r.map((a,c)=>(0,b.jsx)(h.motion.div,{className:`flex ${a.from_me?"justify-end":"justify-start"}`,initial:{opacity:0,y:20,scale:.8},animate:{opacity:1,y:0,scale:1},transition:{delay:.7+.1*c,type:"spring",stiffness:300},children:(0,b.jsxs)("div",{className:`max-w-[80%] rounded-2xl p-3 relative ${a.from_me?"bg-gradient-to-r from-[#2F537D] to-[#4A76A8] text-white rounded-br-none":"bg-white text-gray-800 shadow-sm rounded-bl-none border border-gray-100"}`,children:[a.attachments&&a.attachments.length>0?(0,b.jsxs)("div",{className:"space-y-2",children:[a.attachments.map((a,c)=>(0,b.jsx)("img",{src:a.url,alt:"attachment",className:"rounded-lg max-w-full h-auto max-h-48 object-cover"},c)),a.body&&(0,b.jsx)("p",{className:"text-sm mt-2",children:a.body})]}):(0,b.jsx)("p",{className:"text-sm",children:a.body}),(0,b.jsx)("span",{className:`text-xs mt-1 block ${a.from_me?"text-blue-100":"text-gray-500"}`,children:(a=>{try{return new Date(a).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch(a){return"الآن"}})(a.created_at)})]})},a.id)),(0,b.jsx)("div",{ref:B})]})}),(0,b.jsxs)(h.motion.div,{className:"border-t border-gray-200 p-4 bg-white",initial:{opacity:0,y:50},animate:{opacity:1,y:0},transition:{delay:.8},children:[v.length>0&&(0,b.jsx)("div",{className:"flex flex-wrap gap-2 mb-3",children:v.map((a,c)=>(0,b.jsx)("div",{className:"relative",children:(0,b.jsxs)("div",{className:"bg-gray-100 rounded-lg px-3 py-2 text-sm flex items-center gap-2",children:[(0,b.jsx)(f,{className:"text-gray-600"}),(0,b.jsx)("span",{className:"text-gray-700 max-w-[120px] truncate",children:a.name}),(0,b.jsx)("button",{onClick:()=>{w(a=>a.filter((a,b)=>b!==c))},className:"text-red-500 hover:text-red-700",children:(0,b.jsx)(g.IoClose,{className:"text-sm"})})]})},c))}),(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)(h.motion.button,{onClick:()=>{E.current?.click()},className:"text-gray-500 hover:text-[#2F537D] p-2 rounded-lg hover:bg-gray-100 transition-all duration-200",whileHover:{scale:1.05},whileTap:{scale:.95},initial:{scale:0},animate:{scale:1},transition:{delay:.85,type:"spring"},children:(0,b.jsx)(f,{className:"text-xl"})}),(0,b.jsx)("input",{ref:C,type:"text",value:p,onChange:a=>q(a.target.value),onKeyPress:a=>{"Enter"!==a.key||a.shiftKey||(a.preventDefault(),L())},placeholder:d("typeYourMessage"),disabled:x,className:"flex-1 border border-gray-300 rounded-xl px-4 py-3 focus:outline-none focus:border-[#2F537D] focus:ring-2 focus:ring-[#2F537D]/20 transition-all text-right disabled:bg-gray-100"}),(0,b.jsx)(h.motion.button,{onClick:L,disabled:x||!p.trim()&&0===v.length||!t,className:"bg-gradient-to-r from-[#2F537D] to-[#4A76A8] text-white p-3 rounded-xl hover:shadow-lg disabled:opacity-50 disabled:cursor-not-allowed transition-all flex items-center justify-center",whileTap:{scale:.95},initial:{scale:0},animate:{scale:1},transition:{delay:.9,type:"spring"},children:x?(0,b.jsx)("div",{className:"w-4 h-4 border-2 border-white border-t-transparent rounded-full animate-spin"}):(0,b.jsx)(g.IoSend,{className:`text-lg transform ${a?"rotate-180":""}`})})]}),(0,b.jsx)("input",{type:"file",ref:E,onChange:a=>{if(a.target.files){let b=Array.from(a.target.files);w(a=>[...a,...b])}},className:"hidden",accept:"image/*,.pdf,.doc,.docx",multiple:!0}),(0,b.jsx)(h.motion.p,{className:"text-xs text-gray-500 text-center mt-2",initial:{opacity:0},animate:{opacity:1},transition:{delay:1},children:d("supportAvailability")})]})]})})})]})}},33113,a=>{"use strict";a.s(["default",()=>g],33113);var b=a.i(87924),c=a.i(46271),d=a.i(72131),e=a.i(54760);let f={some:0,all:1};function g({children:a,delay:g=0,direction:h="up",className:i=""}){let j=(0,d.useRef)(null),k=function(a,{root:b,margin:c,amount:g,once:h=!1,initial:i=!1}={}){let[j,k]=(0,d.useState)(i);return(0,d.useEffect)(()=>{if(!a.current||h&&j)return;let d={root:b&&b.current||void 0,margin:c,amount:g};return function(a,b,{root:c,margin:d,amount:g="some"}={}){let h=(0,e.resolveElements)(a),i=new WeakMap,j=new IntersectionObserver(a=>{a.forEach(a=>{let c=i.get(a.target);if(!!c!==a.isIntersecting)if(a.isIntersecting){let c=b(a.target,a);"function"==typeof c?i.set(a.target,c):j.unobserve(a.target)}else"function"==typeof c&&(c(a),i.delete(a.target))})},{root:c,rootMargin:d,threshold:"number"==typeof g?g:f[g]});return h.forEach(a=>j.observe(a)),()=>j.disconnect()}(a.current,()=>(k(!0),h?void 0:()=>k(!1)),d)},[b,a,c,h,g]),j}(j,{once:!0,amount:.1}),l={up:{y:50,opacity:0},down:{y:-50,opacity:0},left:{x:50,opacity:0},right:{x:-50,opacity:0}};return(0,b.jsx)(c.motion.div,{ref:j,initial:l[h],animate:k?{x:0,y:0,opacity:1}:l[h],transition:{duration:.6,delay:.1*g,ease:[.16,1,.3,1]},className:i,children:a})}}];

//# sourceMappingURL=_ee6a06c1._.js.map