import{a as p,t as A,b as tt,c as ke}from"../chunks/disclose-version.Dr32KdXi.js";import"../chunks/legacy.DQ3C9O0k.js";import{p as at,o as rt,f as O,a as st,b as t,g as e,m as h,c as o,r as s,n as Se,s as d,t as D,G as Q,e as H}from"../chunks/index-client.7IhS7CEJ.js";import{e as it,s as F}from"../chunks/render.CrlMBPJT.js";import{s as ot,i as y,a as nt}from"../chunks/props.ey59GOCo.js";import{e as lt,i as ct,a as dt,b as ut}from"../chunks/class.gRz_Vu6d.js";import{t as L,f as U}from"../chunks/index.B0UUTf0u.js";import{i as vt}from"../chunks/lifecycle.ZIc96j8x.js";import{g as ft}from"../chunks/entry.CGbGG2JM.js";import{g as mt}from"../chunks/gameStore.HeQ5aboT.js";import{a as pt}from"../chunks/score.CvsMy6yj.js";import"../chunks/index.D2vQXN-9.js";import{F as B,t as ht,u as le,v as Me,w as gt,x as _t,y as bt,z as xt}from"../chunks/index.Dm74xIX2.js";/* empty css */import{G as kt,V as St,c as Mt}from"../chunks/GameFeedbackModal.gO8kQILG.js";import{f as K}from"../chunks/feedbackStore.zHUT5hQm.js";import{B as wt}from"../chunks/button.GBf0ywTe.js";var Ct=A('
',1),qt=A('
Testoni njohuritë tuaja për makinat
Përgjigjuni pyetjeve. Sa më shpejt përgjigjeni, aq më shumë pikë fitoni!
'),jt=A(''),yt=A('
'),Bt=A(''),At=A(''),Pt=A('
Quiz për makinat
',1);function Kt(we,Ce){at(Ce,!1);const qe=ot(),R=()=>nt(K,"$feedbackStore",qe);let l=h(0),k=h(0),v=h(0),c,P=h(!1),z=h(!1),M=!1,u=h(null),w=null,g=h(0),C=0,_=h(0),q=h(!1),I=!1;const J=[{question:"Cili prodhues makinash ka 4 unaza të ndërlidhura në logon e tij?",answers:["Audi","BMW","Mercedes-Benz","Volkswagen"],correct:0},{question:"Çfarë do të thotë 'BMW'?",answers:["British Motor Works","Bayerische Motoren Werke","Berlin Motor Works","Bremen Motor Works"],correct:1},{question:"Cili është modeli më i shitur i Mercedes-Benz në Shqipëri?",answers:["C-Class","E-Class","A-Class","S-Class"],correct:1},{question:"Nga cili vend është Ferrari?",answers:["Gjermani","Francë","Itali","Spanjë"],correct:2},{question:"Cili është slogani i BMW?",answers:["Mercedes ose Asgjë","Makina Përfundimtare e Drejtimit","Teknika e Përparuar","Kënaqësia e Drejtimit"],correct:3},{question:"Çfarë kafshe shfaqet në logon e Lamborghini?",answers:["Kalë","Luan","Dem","Jaguar"],correct:2},{question:"Cila kompani automobilistike zotëron Bugatti?",answers:["Grupi Volkswagen","Grupi BMW","Grupi Mercedes-Benz","Stellantis"],correct:0},{question:"Cili është prodhuesi më i madh i pjesëve të këmbimit në Shqipëri?",answers:["AMS","Vibtex","Autoparts Albania","Euro Parts"],correct:0},{question:"Cila markë makinash është më e popullarizuar në Shqipëri?",answers:["Volkswagen","Mercedes-Benz","BMW","Audi"],correct:1},{question:"Çfarë do të thotë 'AMG' në Mercedes-AMG?",answers:["Auto Motor Group","Aufrecht, Melcher, Großaspach","Advanced Motor Gear","Active Motion Guide"],correct:1},{question:"Cili është porti kryesor në Shqipëri për importin e makinave?",answers:["Porti i Durrësit","Porti i Vlorës","Porti i Shëngjinit","Porti i Sarandës"],correct:0},{question:"Cili është modeli më i shitur i makinave në historinë botërore?",answers:["Ford Model T","Volkswagen Beetle","Toyota Corolla","Honda Civic"],correct:2},{question:"Në cilin vit u hap rruga e parë e asfaltuar në Shqipëri?",answers:["1920","1925","1930","1935"],correct:2},{question:"Cila ishte makina e parë zyrtare e qeverisë shqiptare pas viteve '90?",answers:["Mercedes-Benz S-Class","BMW Seria 7","Audi A8","Volkswagen Phaeton"],correct:0},{question:"Cili prodhues automobilistik prodhon 'Skyline GT-R'?",answers:["Toyota","Honda","Nissan","Mazda"],correct:2},{question:"Në cilin vit u hoqën kufizimet për importin e makinave në Shqipëri?",answers:["1991","1993","1995","1997"],correct:1},{question:"Cila kompani krijoi makinën e parë hibride në prodhim masiv?",answers:["Toyota","Honda","Ford","Chevrolet"],correct:0},{question:"Cili është qyteti me numrin më të madh të makinave në Shqipëri?",answers:["Durrësi","Tirana","Vlora","Shkodra"],correct:1},{question:"Cila kompani prodhon 'Land Cruiser'?",answers:["Land Rover","Toyota","Jeep","Mitsubishi"],correct:1},{question:"Cila është mosha mesatare e makinave në Shqipëri?",answers:["8 vjet","12 vjet","15 vjet","20 vjet"],correct:2}];let f=h([]);const je=10,X=10,ye=20,Be=1,ce=30,de=120;function Ae(a){for(let r=a.length-1;r>0;r--){const i=Math.floor(Math.random()*(r+1));[a[r],a[i]]=[a[i],a[r]]}return a}function Pe(){return Ae([...J]).slice(0,je)}function Y(){t(q,!0),t(v,0),t(k,0),t(l,0),t(g,0),M=!1,t(u,null),w=null,C=0,t(_,0),t(f,Pe()),c&&clearInterval(c),c=setInterval(()=>{!M&&!I&&Q(v)},1e3)}function $e(a){e(u)===null&&(t(u,a),w=a===e(f)[e(l)].correct,w?(Q(g),C++,t(_,Math.max(e(_),C)),t(k,e(k)+X)):C=0,setTimeout(()=>{e(l)=de)return 0;const a=Math.ceil((de-e(v))*Be);return Math.min(a,ye)}function ee(){return e(_)===J.length?ce:Math.ceil(ce*(e(_)/J.length))}function Te(){clearInterval(c);const a=e(g)*X,r=Z(),i=ee(),n=a+r+i;pt(n),mt.addScore("trivia",n),R().currentRound===0&&setTimeout(()=>{V(),t(z,!0),t(q,!1),M=!1,t(k,0),t(v,0),t(l,0),t(g,0),C=0,t(_,0),t(u,null),w=null,c&&clearInterval(c)},2e3),K.incrementRound(),M=!0,t(P,!0),Ge()}function Ge(){const r={origin:{y:.7}};function i(n,m){Mt({...r,...m,particleCount:Math.floor(200*n),scalar:1.2})}i(.25,{spread:26,startVelocity:55,colors:["#FF6B00"]}),i(.2,{spread:60,colors:["#000000"]}),i(.35,{spread:100,decay:.91,scalar:.8,colors:["#FF6B00","#000000"]}),i(.1,{spread:120,startVelocity:25,decay:.92,scalar:1.2,colors:["#FF6B00"]}),i(.1,{spread:120,startVelocity:45,colors:["#000000"]})}function Fe(){t(P,!1),Y()}function Re(){t(P,!1),Y(),R().currentRound%2===1&&!K.isFeedbackShown(R().currentRound)&&setTimeout(()=>{V(),t(z,!0),t(q,!1),M=!1,t(k,0),t(v,0),t(l,0),t(g,0),C=0,t(_,0),t(u,null),w=null,c&&clearInterval(c)},2e3)}function ze(){t(P,!1),ft("/")}function V(){I=!0,c&&clearInterval(c)}function ue(){I=!1,!c&&e(q)&&!M&&(c=setInterval(()=>{I||Q(v)},1e3))}function Ie(){t(z,!1),ue()}rt(()=>{R().currentRound%2===1&&!K.isFeedbackShown(R().currentRound)&&(V(),t(z,!0),t(q,!1),M=!1,t(k,0),t(v,0),t(l,0),t(g,0),C=0,t(_,0),t(u,null),w=null,c&&clearInterval(c))}),vt();var ve=Pt(),te=O(ve),ae=o(te),re=o(ae),fe=o(re),Ve=o(fe);B(Ve,{icon:ht,class:"text-lg"}),s(fe),Se(2),s(re);var me=d(re,2),Ee=o(me);{var Ne=a=>{var r=Ct(),i=O(r),n=o(i);B(n,{icon:le,class:"text-orange-400"});var m=d(n,2),$=o(m);s(m),s(i);var j=d(i,2),T=o(j);B(T,{icon:Me,class:"text-orange-400"});var S=d(T,2);const se=H(()=>Math.floor(e(v)/60)??""),E=H(()=>(e(v)%60).toString().padStart(2,"0")??"");var ie=o(S);D(()=>F(ie,`${e(se)}:${e(E)}`)),s(S),s(j);var N=d(j,2),b=o(N);B(b,{icon:gt,class:"text-orange-400"});var x=d(b,2),W=o(x,!0);s(x),s(N),D(()=>{F($,`${e(g)??""}/${e(f).length??""}`),F(W,e(k))}),p(a,r)};y(Ee,a=>{e(q)&&a(Ne)})}s(me),s(ae);var pe=d(ae,2),We=o(pe);{var Oe=a=>{var r=qt(),i=o(r),n=o(i),m=o(n);B(m,{icon:_t,class:"text-3xl text-orange-400"}),s(n),s(i);var $=d(i,6);wt($,{$$events:{click:Y},children:(j,T)=>{Se();var S=tt("Fillo quizin");p(j,S)},$$slots:{default:!0}}),s(r),L(1,r,()=>U),p(a,r)},De=a=>{var r=yt(),i=o(r),n=o(i),m=o(n);s(n);var $=d(n,2),j=o($);s($),s(i);var T=d(i,2),S=o(T),se=o(S,!0);s(S);var E=d(S,2);lt(E,5,()=>e(f)[e(l)].answers,ct,(ie,N,b)=>{var x=jt(),W=o(x),ge=o(W);{var Ue=oe=>{var be=ke(),Je=O(be);{var Xe=G=>{B(G,{icon:le,class:"text-green-500"})},Ye=G=>{var xe=ke(),Ze=O(xe);{var et=ne=>{B(ne,{icon:xt,class:"text-red-500"})};y(Ze,ne=>{e(u)===b&&ne(et)},!0)}p(G,xe)};y(Je,G=>{b===e(f)[e(l)].correct?G(Xe):G(Ye,!1)})}p(oe,be)};y(ge,oe=>{e(u)!==null&&oe(Ue)})}var _e=d(ge,2),Ke=o(_e,!0);s(_e),s(W),s(x),D(()=>{dt(x,`p-4 text-left rounded-lg transition-all duration-200
${(e(u)===null?"bg-orange-500/10 hover:bg-orange-500/20":e(u)===b?b===e(f)[e(l)].correct?"bg-green-500/20 border-green-500":"bg-red-500/20 border-red-500":b===e(f)[e(l)].correct?"bg-green-500/20 border-green-500":"bg-orange-500/5")??""}
${(e(u)!==null?"cursor-default":"cursor-pointer")??""} svelte-9yd27s`),x.disabled=e(u)!==null,F(Ke,e(N))}),it("click",x,()=>$e(b)),p(ie,x)}),s(E),s(T),s(r),D(()=>{F(m,`Pyetja ${e(l)+1} nga ${e(f).length??""}`),ut(j,"style",`width: ${(e(l)+1)/e(f).length*100}%`),F(se,e(f)[e(l)].question)}),L(1,r,()=>U),p(a,r)};y(We,a=>{e(q)?a(De,!1):a(Oe)})}s(pe),s(te);var he=d(te,2);{var Qe=a=>{var r=Bt(),i=o(r);kt(i,{show:!0,onGamePause:V,onGameResume:ue,onClose:Ie}),s(r),L(3,r,()=>U),p(a,r)};y(he,a=>{e(z)&&a(Qe)})}var He=d(he,2);{var Le=a=>{var r=At(),i=o(r),n=H(()=>[{icon:le,label:"Përgjigje të sakta",value:`${e(g)}/${e(f).length}`,bonus:`${e(g)*X} pikë`},{icon:Me,label:"Koha",value:`${Math.floor(e(v)/60)}:${(e(v)%60).toString().padStart(2,"0")}`,bonus:`+${Z()} pikë`},{icon:bt,label:"Saktësi e vazhdueshme",value:`${e(_)}`,bonus:`+${ee()} pikë`}]),m=H(()=>e(k)+Z()+ee());St(i,{get show(){return e(P)},get stats(){return e(n)},get totalScore(){return e(m)},onClose:Fe,onPlayAgain:Re,onHome:ze,gameTitle:"Car Trivia"}),s(r),L(3,r,()=>U),p(a,r)};y(He,a=>{e(P)&&a(Le)})}p(we,ve),st()}export{Kt as component};