import{a as k,t as F,b as Xe,c as ge}from"../chunks/disclose-version.Dr32KdXi.js";import"../chunks/legacy.DQ3C9O0k.js";import{p as Ye,o as Ze,f as I,a as et,b as t,g as e,m as p,c as i,r as s,n as be,s as c,t as N,G as re,e as W}from"../chunks/index-client.7IhS7CEJ.js";import{e as tt,s as P}from"../chunks/render.CrlMBPJT.js";import{s as rt,i as C,a as at}from"../chunks/props.ey59GOCo.js";import{e as st,i as it,a as ot,b as nt}from"../chunks/class.gRz_Vu6d.js";import{t as ae,f as se}from"../chunks/index.D9tZSTxG.js";import{i as lt}from"../chunks/lifecycle.ZIc96j8x.js";import{g as ct}from"../chunks/entry.DEKR4jXd.js";import{g as dt}from"../chunks/gameStore.HeQ5aboT.js";import{a as ut}from"../chunks/score.CvsMy6yj.js";import"../chunks/index.D2vQXN-9.js";import{F as y,w as vt,u as ie,x as _e,y as ft,z as mt,A as pt,B as ht}from"../chunks/index.O3SlIjYX.js";/* empty css */import{G as gt,V as bt,c as _t}from"../chunks/GameFeedbackModal.B4JWRGUV.js";import{f as O}from"../chunks/feedbackStore.CZ4XRG4M.js";import{B as kt}from"../chunks/button.CNx5NZoe.js";var xt=F('
',1),St=F('
Testoni njohuritë tuaja për makinat
Përgjigjuni pyetjeve. Sa më shpejt përgjigjeni, aq më shumë pikë fitoni!
'),Mt=F(''),wt=F('
'),qt=F(''),Ct=F('
Quiz për makinat
',1);function Dt(ke,xe){Ye(xe,!1);const Se=rt(),G=()=>at(O,"$feedbackStore",Se);let l=p(0),x=p(0),v=p(0),f,j=p(!1),R=p(!1),d=p(null),M=null,h=p(0),w=0,g=p(0),B=p();const D=[{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 u=p([]);const Me=10,Q=10,we=20,qe=1,oe=30,ne=120;function Ce(r){for(let a=r.length-1;a>0;a--){const o=Math.floor(Math.random()*(a+1));[r[a],r[o]]=[r[o],r[a]]}return r}function ye(){return Ce([...D]).slice(0,Me)}function H(){t(B,!0),t(v,0),t(x,0),t(l,0),t(h,0),t(d,null),M=null,w=0,t(g,0),t(u,ye()),f&&clearInterval(f),f=setInterval(()=>{re(v)},1e3)}function je(r){e(d)===null&&(t(d,r),M=r===e(u)[e(l)].correct,M?(re(h),w++,t(g,Math.max(e(g),w)),t(x,e(x)+Q)):w=0,setTimeout(()=>{e(l)=ne)return 0;const r=Math.ceil((ne-e(v))*qe);return Math.min(r,we)}function U(){return e(g)===D.length?oe:Math.ceil(oe*(e(g)/D.length))}function Be(){clearInterval(f);const r=e(h)*Q,a=L(),o=U(),n=r+a+o;ut(n),dt.addScore("trivia",n),G().currentRound===0&&setTimeout(()=>{t(R,!0),t(B,!1),t(x,0),t(v,0),t(l,0),t(h,0),w=0,t(g,0),t(d,null),M=null,f&&clearInterval(f)},2e3),O.incrementRound(),t(j,!0),Ae()}function Ae(){const a={origin:{y:.7}};function o(n,m){_t({...a,...m,particleCount:Math.floor(200*n),scalar:1.2})}o(.25,{spread:26,startVelocity:55,colors:["#FF6B00"]}),o(.2,{spread:60,colors:["#000000"]}),o(.35,{spread:100,decay:.91,scalar:.8,colors:["#FF6B00","#000000"]}),o(.1,{spread:120,startVelocity:25,decay:.92,scalar:1.2,colors:["#FF6B00"]}),o(.1,{spread:120,startVelocity:45,colors:["#000000"]})}function $e(){t(j,!1),H()}function Te(){t(j,!1),H(),G().currentRound%2===1&&!O.isFeedbackShown(G().currentRound)&&setTimeout(()=>{t(R,!0),t(B,!1),t(x,0),t(v,0),t(l,0),t(h,0),w=0,t(g,0),t(d,null),M=null,f&&clearInterval(f)},2e3)}function Pe(){t(j,!1),ct("/")}function Fe(){t(R,!1)}Ze(()=>{G().currentRound%2===1&&!O.isFeedbackShown(G().currentRound)&&(t(R,!0),t(B,!1),t(x,0),t(v,0),t(l,0),t(h,0),w=0,t(g,0),t(d,null),M=null,f&&clearInterval(f))}),lt();var le=Ct(),K=I(le),J=i(K),X=i(J),ce=i(X),Ge=i(ce);y(Ge,{icon:vt,class:"text-lg"}),s(ce),be(2),s(X);var de=c(X,2),Re=i(de);{var ze=r=>{var a=xt(),o=I(a),n=i(o);y(n,{icon:ie,class:"text-orange-400"});var m=c(n,2),A=i(m);s(m),s(o);var q=c(o,2),$=i(q);y($,{icon:_e,class:"text-orange-400"});var S=c($,2);const Y=W(()=>Math.floor(e(v)/60)??""),z=W(()=>(e(v)%60).toString().padStart(2,"0")??"");var Z=i(S);N(()=>P(Z,`${e(Y)}:${e(z)}`)),s(S),s(q);var V=c(q,2),b=i(V);y(b,{icon:ft,class:"text-orange-400"});var _=c(b,2),E=i(_,!0);s(_),s(V),N(()=>{P(A,`${e(h)??""}/${e(u).length??""}`),P(E,e(x))}),k(r,a)};C(Re,r=>{e(B)&&r(ze)})}s(de),s(J);var ue=c(J,2),Ve=i(ue);{var Ee=r=>{var a=St(),o=i(a),n=i(o),m=i(n);y(m,{icon:mt,class:"text-3xl text-orange-400"}),s(n),s(o);var A=c(o,6);kt(A,{$$events:{click:H},children:(q,$)=>{be();var S=Xe("Fillo quizin");k(q,S)},$$slots:{default:!0}}),s(a),ae(1,a,()=>se),k(r,a)},Ie=r=>{var a=wt(),o=i(a),n=i(o),m=i(n);s(n);var A=c(n,2),q=i(A);s(A),s(o);var $=c(o,2),S=i($),Y=i(S,!0);s(S);var z=c(S,2);st(z,5,()=>e(u)[e(l)].answers,it,(Z,V,b)=>{var _=Mt(),E=i(_),fe=i(E);{var De=ee=>{var pe=ge(),He=I(pe);{var Le=T=>{y(T,{icon:ie,class:"text-green-500"})},Ue=T=>{var he=ge(),Ke=I(he);{var Je=te=>{y(te,{icon:ht,class:"text-red-500"})};C(Ke,te=>{e(d)===b&&te(Je)},!0)}k(T,he)};C(He,T=>{b===e(u)[e(l)].correct?T(Le):T(Ue,!1)})}k(ee,pe)};C(fe,ee=>{e(d)!==null&&ee(De)})}var me=c(fe,2),Qe=i(me,!0);s(me),s(E),s(_),N(()=>{ot(_,`p-4 text-left rounded-lg transition-all duration-200
${(e(d)===null?"bg-orange-500/10 hover:bg-orange-500/20":e(d)===b?b===e(u)[e(l)].correct?"bg-green-500/20 border-green-500":"bg-red-500/20 border-red-500":b===e(u)[e(l)].correct?"bg-green-500/20 border-green-500":"bg-orange-500/5")??""}
${(e(d)!==null?"cursor-default":"cursor-pointer")??""} svelte-9yd27s`),_.disabled=e(d)!==null,P(Qe,e(V))}),tt("click",_,()=>je(b)),k(Z,_)}),s(z),s($),s(a),N(()=>{P(m,`Pyetja ${e(l)+1} nga ${e(u).length??""}`),nt(q,"style",`width: ${(e(l)+1)/e(u).length*100}%`),P(Y,e(u)[e(l)].question)}),ae(1,a,()=>se),k(r,a)};C(Ve,r=>{e(B)?r(Ie,!1):r(Ee)})}s(ue),s(K);var ve=c(K,2);{var Ne=r=>{gt(r,{show:!0,onClose:Fe})};C(ve,r=>{e(R)&&r(Ne)})}var We=c(ve,2);{var Oe=r=>{var a=qt(),o=i(a),n=W(()=>[{icon:ie,label:"Përgjigje të sakta",value:`${e(h)}/${e(u).length}`,bonus:`${e(h)*Q} pikë`},{icon:_e,label:"Koha",value:`${Math.floor(e(v)/60)}:${(e(v)%60).toString().padStart(2,"0")}`,bonus:`+${L()} pikë`},{icon:pt,label:"Saktësi e vazhdueshme",value:`${e(g)}`,bonus:`+${U()} pikë`}]),m=W(()=>e(x)+L()+U());bt(o,{get show(){return e(j)},get stats(){return e(n)},get totalScore(){return e(m)},onClose:$e,onPlayAgain:Te,onHome:Pe,gameTitle:"Car Trivia"}),s(a),ae(3,a,()=>se),k(r,a)};C(We,r=>{e(j)&&r(Oe)})}k(ke,le),et()}export{Dt as component};