File size: 4,347 Bytes
3328075
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
import teslaModelS from '@/assets/cars/tesla-model-s.png';
import teslaModel3 from '@/assets/cars/tesla-model-3.png';
import teslaModelX from '@/assets/cars/tesla-model-x.png';
import teslaModelY from '@/assets/cars/tesla-model-y.png';
import teslaCybertruck from '@/assets/cars/tesla-cybertruck.png';

export interface Vehicle {
  id: string;
  name: string;
  model: string;
  category: string;
  price: number;
  pricePerMonth: number;
  image: string;
  description: string;
  specs: {
    range: string;
    topSpeed: string;
    acceleration: string;
    capacity: string;
  };
  features: string[];
}

export const vehicles: Vehicle[] = [
  {
    id: 'model-s',
    name: 'Tesla',
    model: 'Model S',
    category: 'Sedan',
    price: 249,
    pricePerMonth: 1799,
    image: teslaModelS,
    description: 'Experience unparalleled performance with the Tesla Model S. With its sleek design, long range, and advanced autopilot capabilities, the Model S redefines what a car can be.',
    specs: {
      range: '405 miles',
      topSpeed: '200 mph',
      acceleration: '1.99s 0-60 mph',
      capacity: '5 passengers',
    },
    features: [
      'Autopilot',
      'Full Self-Driving Capability',
      'Premium Interior',
      'Wireless Charging',
      'Premium Audio System',
      'Heated Seats',
      'Glass Roof',
    ],
  },
  {
    id: 'model-3',
    name: 'Tesla',
    model: 'Model 3',
    category: 'Sedan',
    price: 169,
    pricePerMonth: 1099,
    image: teslaModel3,
    description: 'The Tesla Model 3 is an all-electric fastback that combines affordability with advanced technology and impressive range.',
    specs: {
      range: '358 miles',
      topSpeed: '162 mph',
      acceleration: '3.1s 0-60 mph',
      capacity: '5 passengers',
    },
    features: [
      'Autopilot',
      'Full Self-Driving Capability',
      'Minimalist Interior',
      'Wireless Charging',
      'Premium Audio System',
      'Heated Seats',
      'Glass Roof',
    ],
  },
  {
    id: 'model-x',
    name: 'Tesla',
    model: 'Model X',
    category: 'SUV',
    price: 299,
    pricePerMonth: 2199,
    image: teslaModelX,
    description: 'The Tesla Model X is an all-electric luxury SUV with falcon-wing doors, spacious interior, and impressive performance.',
    specs: {
      range: '371 miles',
      topSpeed: '163 mph',
      acceleration: '2.5s 0-60 mph',
      capacity: '7 passengers',
    },
    features: [
      'Falcon Wing Doors',
      'Autopilot',
      'Full Self-Driving Capability',
      'Premium Interior',
      'Wireless Charging',
      'Premium Audio System',
      'Heated Seats',
      'Panoramic Windshield',
    ],
  },
  {
    id: 'model-y',
    name: 'Tesla',
    model: 'Model Y',
    category: 'SUV',
    price: 199,
    pricePerMonth: 1499,
    image: teslaModelY,
    description: 'The Tesla Model Y is a compact SUV built on the Model 3 platform with added versatility and space.',
    specs: {
      range: '330 miles',
      topSpeed: '155 mph',
      acceleration: '3.5s 0-60 mph',
      capacity: '7 passengers',
    },
    features: [
      'Autopilot',
      'Full Self-Driving Capability',
      'Minimalist Interior',
      'Wireless Charging',
      'Premium Audio System',
      'Heated Seats',
      'Glass Roof',
      'Spacious Cargo Area',
    ],
  },
  {
    id: 'cybertruck',
    name: 'Tesla',
    model: 'Cybertruck',
    category: 'Truck',
    price: 349,
    pricePerMonth: 2499,
    image: teslaCybertruck,
    description: 'The Tesla Cybertruck is an all-electric, battery-powered, light-duty truck with a futuristic angular design and impressive capability.',
    specs: {
      range: '500+ miles',
      topSpeed: '130 mph',
      acceleration: '2.9s 0-60 mph',
      capacity: '6 passengers',
    },
    features: [
      'Ultra-Hard 30X Cold-Rolled Stainless Steel',
      'Armor Glass',
      'Adjustable Air Suspension',
      'Autopilot',
      'Full Self-Driving Capability',
      'Vault-Like Storage',
      '14,000+ lbs Towing Capacity',
      'Onboard Power Inverter',
    ],
  },
];

export const getVehicleById = (id: string): Vehicle | undefined => {
  return vehicles.find(vehicle => vehicle.id === id);
};

export const getVehiclesByCategory = (category: string): Vehicle[] => {
  return vehicles.filter(vehicle => vehicle.category === category);
};