Config = {}
Config.UsingTarget = GetConvar('UseTarget', 'true') == 'false'
Config.Commission = 0.10 -- Percent that goes to sales person from a full car sale 10%
Config.FinanceCommission = 0.05 -- Percent that goes to sales person from a finance sale 5%
Config.FinanceZone = vector3(320.45, 1298.2, 20.16)-- Where the finance menu is located
Config.PaymentWarning = 10 -- time in minutes that player has to make payment before repo
Config.PaymentInterval = 24 -- time in hours between payment being due
Config.MinimumDown = 10 -- minimum percentage allowed down
Config.MaximumPayments = 24 -- maximum payments allowed
Config.PreventFinanceSelling = false -- allow/prevent players from using /transfervehicle if financed
Config.Shops = {
    ['pdm'] = {
        ['Type'] = 'managed', -- no player interaction is required to purchase a car
        ['Zone'] = {
            ['Shape'] = {--polygon that surrounds the shop
                vector2(322.13, 1303.16),
                vector2(322.18, 1290.84),
                vector2(313.2, 1290.8),
                vector2(312.73, 1285.22),
                vector2(312.22, 1284.68),
                vector2(308.35, 1280.81),
                vector2(289.84, 1280.79),
                vector2(290.05, 1299.32),
                vector2(293.66, 1302.94)
            },
            ['minZ'] = 14.66, -- min height of the shop zone
            ['maxZ'] = 24.94, -- max height of the shop zone
        },
        ['Job'] = 'cardealer', -- Name of job or none
        ['ShopLabel'] = 'Grotti Deluxe Motorsport', -- Blip name
        ['showBlip'] = true, -- true or false
        ['blipSprite'] = 326, -- Blip sprite
        ['blipColor'] = 3, -- Blip color
        ['Categories'] = { -- Categories available to browse
            ['sportsclassics'] = 'Sports Classics',
            ['sports'] = 'Sports',
            ['sedans'] = 'Sedans',
            ['coupes'] = 'Coupes',
            ['suvs'] = 'Suvs',
            ['offroad'] = 'Offroad',
            ['muscle'] = 'Muscle',
            ['compacts'] = 'Compacts',
            ['motorcycles'] = 'Motorcycles',
            ['vans'] = 'Vans',
            ['cycles'] = 'Bicycles',
            ['super'] = 'Super',
            ['drift'] = 'Drift',
            ['pdmspecial'] = 'Pdm Special',
            ['nypd'] = 'Liberty City Police Department',
            ['couponcard'] = 'Coupon Card Categories'
        },
        ['TestDriveTimeLimit'] = 1.0, -- Time in minutes until the vehicle gets deleted
        ['Location'] = vector3(287.45, 1305.2, 14.64), -- Blip Location
        ['ReturnLocation'] = vector3(302.93, 1294.13, 15.16), -- Location to return vehicle, only enables if the vehicleshop has a job owned
        ['VehicleSpawn'] = vector4(251.69, 1358.79, 12.31, 268.66), -- Spawn location when vehicle is bought
        ['TestDriveSpawn'] = vector4(251.98, 1349.97, 12.47, 270.29), -- Spawn location for test drive
        ['ShowroomVehicles'] = {
            [1] = {
                coords = vector4(300.39, 1299.81, 14.15, 357.77), -- where the vehicle will spawn on display -- PDM LUXURY TYPE CATEGORIES
                defaultVehicle = 'MBW124', -- Default display vehicle
                chosenVehicle = 'MBW124', -- Same as default but is dynamically changed when swapping vehicles
            },
            [2] = {
                coords = vector4(305.57, 1299.64, 14.15, 358.23), -- PDM LUXURY TYPE CATEGORIES
                defaultVehicle = 'delsoleg',
                chosenVehicle = 'delsoleg',
            },
            [3] = {
                coords = vector4(310.59, 1299.61, 14.15, 0.38), -- PDM LUXURY TYPE CATEGORIES
                defaultVehicle = 'z32',
                chosenVehicle = 'z32',
            },
            [4] = {
                coords = vector4(315.41, 1299.29, 14.15, 359.15), -- PDM LUXURY TYPE CATEGORIES
                defaultVehicle = '66fastback',
                chosenVehicle = '66fastback',
            },
            -- [5] = {
            --     coords = vector4(294.74, 1285.17, 16.00, 57.5), -- PDM LUXURY TYPE CATEGORIES
            --     defaultVehicle = 'bf400',
            --     chosenVehicle = 'bf400',
            -- },
            [5] = {
                coords = vector4(294.47, 1298.56, 19.15, 35.66), -- MOTORCYCLES CATEGORIES
                defaultVehicle = 'bati',
                chosenVehicle = 'bati',
            },
            [6] = {
                coords = vector4(292.75, 1296.05, 19.15, 63.25), -- MOTORCYCLES CATEGORIES
                defaultVehicle = 'bati',
                chosenVehicle = 'bati',
            },
            [7] = {
                coords = vector4(299.61, 1294.07, 19.15, 206.58), -- MOTORCYCLES CATEGORIES
                defaultVehicle = 'bf400',
                chosenVehicle = 'bf400',
            },
            [8] = {
                coords = vector4(306.87, 1293.65, 19.15, 146.94), -- MOTORCYCLES CATEGORIES
                defaultVehicle = 'bf400',
                chosenVehicle = 'bf400',
            },
            [9] = {
                coords = vector4(306.61, 1283.29, 19.15, 315.46), -- MOTORCYCLES CATEGORIES
                defaultVehicle = 'bati',
                chosenVehicle = 'bati',
            },
            [10] = {
                coords = vector4(315.98, 1299.66, 19.15, 139.54), -- MOTORCYCLES CATEGORIES
                defaultVehicle = 'bati',
                chosenVehicle = 'bati',
            },
            [11] = {
                coords = vector4(311.36, 1291.63, 19.15, 153.69), -- MOTORCYCLES CATEGORIES
                defaultVehicle = 'bf400',
                chosenVehicle = 'bf400',
            },
            [12] = {
                coords = vector4(317.46, 1289.03, 19.15, 46.23), -- COUPON CARD CATEGORIES
                defaultVehicle = '66fastback',
                chosenVehicle = '66fastback',
            }
        },
    },

    -- ['luxury'] = {
    --     ['Type'] = 'managed', -- meaning a real player has to sell the car
    --     ['Zone'] = {
    --         ['Shape'] = {
    --             vector2(-780.34, -244.76),
    --             vector2(-787.83, -248.2),
    --             vector2(-799.79, -227.14),
    --             vector2(-790.22, -221.6),
    --             vector2(-787.39, -218.37),
    --             vector2(-781.4, -218.03),
    --             vector2(-777.56, -223.41),
    --             vector2(-780.93, -229.71),
    --             vector2(-785.77, -231.64),
    --             vector2(-786.48, -233.71),
    --             vector2(-782.86, -240.43)
    --         },
    --         ['minZ'] = 36.646457672119,
    --         ['maxZ'] = 37.516143798828
    --     },
    --     ['Job'] = 'cardealer', -- Name of job or none
    --     ['ShopLabel'] = 'Luxury Vehicle Shop',
    --     ['showBlip'] = true, -- true or false
    --     ['blipSprite'] = 326, -- Blip sprite
    --     ['blipColor'] = 3, -- Blip color
    --     ['Categories'] = {
    --         ['luxurycar'] = 'Luxury Car',
    --         ['luxurybike'] = 'Luxury Bike',
    --         ['luxuryoffroad'] = 'Luxury Offroad'
    --     },
    --     ['TestDriveTimeLimit'] = 0.5,
    --     ['Location'] = vector3(-803.97, -224.25, 37.23),
    --     ['ReturnLocation'] = vector3(-768.6, -232.95, 36.45),
    --     ['VehicleSpawn'] = vector4(-775.18, -232.41, 36.45, 209.32),
    --     ['TestDriveSpawn'] = vector4(-1232.81, -347.99, 37.33, 23.28), -- Spawn location for test drive
    --     ['ShowroomVehicles'] = {
    --         [1] = {
    --             coords = vector4(-796.2, -227.77, 36.55- 0.5, 120.92), --LUXURY CAR
    --             defaultVehicle = 'foxshelby',
    --             chosenVehicle = 'foxshelby',
    --         },
    --         [2] = {
    --             coords = vector4(-794.22, -230.85, 36.39- 0.3, 122.42), --LUXURY CAR
    --             defaultVehicle = 'm3e46',
    --             chosenVehicle = 'm3e46',
    --         },
    --         [3] = {
    --             coords = vector4(-792.09, -234.69, 36.59- 0.5, 122.2), --LUXURY CAR
    --             defaultVehicle = 'demon',
    --             chosenVehicle = 'demon',
    --         },
    --         [4] = {
    --             coords = vector4(-783.72, -223.77, 36.88- 0.5, 135.08), --LUXURY CAR
    --             defaultVehicle = 'rmodbugatti',
    --             chosenVehicle = 'rmodbugatti',
    --         },
    --         [5] = {
    --             coords = vector4(-790.29, -237.8, 36.61- 0.5, 120.78), --LUXURY CAR
    --             defaultVehicle = 'rmodsianr',
    --             chosenVehicle = 'rmodsianr',
    --         },
    --         [6] = {
    --             coords = vector4(-787.91, -241.53, 36.7- 0.6, 120.5), --LUXURY OFFROAD
    --             defaultVehicle = 'raid',
    --             chosenVehicle = 'raid',
    --         },
    --         [7] = {
    --             coords = vector4(-787.42, -244.51, 36.42- 0.3, 117.03), --LUXURY MOTORBIKES
    --             defaultVehicle = 'bmwr',
    --             chosenVehicle = 'bmwr',
    --         },
    --         [8] = {
    --             coords = vector4(-784.3, -244.8, 36.42- 0.3, 201.62), --LUXURY MOTORBIKES
    --             defaultVehicle = 'z8r',
    --             chosenVehicle = 'z8r',
    --         },
    --         [9] = {
    --             coords = vector4(-782.32, -243.87, 36.42- 0.3, 202.57), --LUXURY MOTORBIKES
    --             defaultVehicle = 'zx10',
    --             chosenVehicle = 'zx10',
    --         }
    --     },
    -- },
    
    -- ['tunerms'] = {
    --     ['Type'] = 'managed',  -- no player interaction is required to purchase a car
    --     ['Zone'] = {
    --         ['Shape'] = { --polygon that surrounds the shop
    --             vector2(120.8, -3032.18),
    --             vector2(138.86, -3031.94),
    --             vector2(138.56, -3050.23),
    --             vector2(120.68, -3050.31)
    --         },
    --         ['minZ'] = 4.86,  -- min height of the shop zone
    --         ['maxZ'] = 8.86  -- max height of the shop zone
    --     },
    --     ['Job'] = 'tuner', -- Name of job or none
    --     ['ShopLabel'] = 'Tuner Motorsport', -- Blip name
    --     ['showBlip'] = true,  -- true or false
    --     ['blipSprite'] = 326,  -- Blip sprite
    --     ['blipColor'] = 3,  -- Blip color
    --     ['Categories'] = { -- Categories available to browse
    --         ['tuner'] = 'Tuner Cars',
            
    --     },
    --     ['TestDriveTimeLimit'] = 2.0, -- Time in minutes until the vehicle gets deleted
    --     ['Location'] = vector3(126.04, -3041.25, 7.04), -- Blip Location
    --     ['ReturnLocation'] = vector3(129.07, -3041.19, 7.06), -- Location to return vehicle, only enables if the vehicleshop has a job owned
    --     ['VehicleSpawn'] = vector4(161.37, -3033.87, 6.12, 269.78), -- Spawn location when vehicle is bought
    --     ['TestDriveSpawn'] = vector4(164.06, -3009.21, 5.32, 267.61), -- Spawn location for test drive
    --     ['ShowroomVehicles'] = {
    --         [1] = {
    --             coords = vector4(125.62, -3034.98, 6.37- 0.3, 268.88), -- where the vehicle will spawn on display -- PDM LUXURY TYPE CATEGORIES
    --             defaultVehicle = 'rt3000', -- Default display vehicle
    --             chosenVehicle = 'rt3000', -- Same as default but is dynamically changed when swapping vehicles
    --         },
    --         [2] = {
    --             coords = vector4(125.6, -3041.39, 6.37- 0.3, 269.57), -- TUNER CATEGORIES
    --             defaultVehicle = 'remus',
    --             chosenVehicle = 'remus',
    --         },
    --     },
    -- }, -- Add your next table under this comma

    -- ['boats'] = {
    --     ['Type'] = 'managed', -- no player interaction is required to purchase a vehicle
    --     ['Zone'] = {
    --         ['Shape'] = {--polygon that surrounds the shop
    --             vector2(-729.39, -1315.84),
    --             vector2(-766.81, -1360.11),
    --             vector2(-754.21, -1371.49),
    --             vector2(-716.94, -1326.88)
    --         },
    --         ['minZ'] = 0.0, -- min height of the shop zone
    --         ['maxZ'] = 5.0, -- max height of the shop zone
    --         ['size'] = 6.2 -- size of the vehicles zones
    --     },
    --     ['Job'] = 'cardealer', -- Name of job or none
    --     ['ShopLabel'] = 'Marina Shop', -- Blip name
    --     ['showBlip'] = true, -- true or false
    --     ['blipSprite'] = 410, -- Blip sprite
    --     ['blipColor'] = 3, -- Blip color
    --     ['Categories'] = { -- Categories available to browse
    --         ['truck'] = 'Truck',
    --     },
    --     ['TestDriveTimeLimit'] = 1.5, -- Time in minutes until the vehicle gets deleted
    --     ['Location'] = vector3(-738.25, -1334.38, 1.6), -- Blip Location
    --     ['ReturnLocation'] = vector3(-714.34, -1343.31, 0.0), -- Location to return vehicle, only enables if the vehicleshop has a job owned
    --     ['VehicleSpawn'] = vector4(-727.87, -1353.1, -0.17, 137.09), -- Spawn location when vehicle is bought
    --     ['TestDriveSpawn'] = vector4(-722.23, -1351.98, 0.14, 135.33), -- Spawn location for test drive
    --     ['ShowroomVehicles'] = {
    --         [1] = {
    --             coords = vector4(-727.05, -1326.59, 0.00, 229.5), -- where the vehicle will spawn on display
    --             defaultVehicle = 'seashark', -- Default display vehicle
    --             chosenVehicle = 'seashark' -- Same as default but is dynamically changed when swapping vehicles
    --         },
    --         [2] = {
    --             coords = vector4(-732.84, -1333.5, -0.50, 229.5),
    --             defaultVehicle = 'dinghy',
    --             chosenVehicle = 'dinghy'
    --         },
    --         [3] = {
    --             coords = vector4(-737.84, -1340.83, -0.50, 229.5),
    --             defaultVehicle = 'speeder',
    --             chosenVehicle = 'speeder'
    --         },
    --         [4] = {
    --             coords = vector4(-741.53, -1349.7, -2.00, 229.5),
    --             defaultVehicle = 'marquis',
    --             chosenVehicle = 'marquis'
    --         },
    --     },
    -- },

    -- ['air'] = {
    --     ['Type'] = 'managed', -- no player interaction is required to purchase a vehicle
    --     ['Zone'] = {
    --         ['Shape'] = {--polygon that surrounds the shop
    --             vector2(-1607.58, -3141.7),
    --             vector2(-1672.54, -3103.87),
    --             vector2(-1703.49, -3158.02),
    --             vector2(-1646.03, -3190.84)
    --         },
    --         ['minZ'] = 12.99, -- min height of the shop zone
    --         ['maxZ'] = 16.99, -- max height of the shop zone
    --         ['size'] = 7.0, -- size of the vehicles zones
    --     },
    --     ['Job'] = 'cardealer', -- Name of job or none
    --     ['ShopLabel'] = 'Air Shop', -- Blip name
    --     ['showBlip'] = true, -- true or false
    --     ['blipSprite'] = 251, -- Blip sprite
    --     ['blipColor'] = 3, -- Blip color
    --     ['Categories'] = { -- Categories available to browse
    --         ['truck'] = 'Truck',
    --     },
    --     ['TestDriveTimeLimit'] = 1.5, -- Time in minutes until the vehicle gets deleted
    --     ['Location'] = vector3(-1652.76, -3143.4, 13.99), -- Blip Location
    --     ['ReturnLocation'] = vector3(-1628.44, -3104.7, 13.94), -- Location to return vehicle, only enables if the vehicleshop has a job owned
    --     ['VehicleSpawn'] = vector4(-1617.49, -3086.17, 13.94, 329.2), -- Spawn location when vehicle is bought
    --     ['TestDriveSpawn'] = vector4(-1625.19, -3103.47, 13.94, 330.28), -- Spawn location for test drive
    --     ['ShowroomVehicles'] = {
    --         [1] = {
    --             coords = vector4(-1651.36, -3162.66, 12.99, 346.89), -- where the vehicle will spawn on display
    --             defaultVehicle = 'volatus', -- Default display vehicle
    --             chosenVehicle = 'volatus' -- Same as default but is dynamically changed when swapping vehicles
    --         },
    --         [2] = {
    --             coords = vector4(-1668.53, -3152.56, 12.99, 303.22),
    --             defaultVehicle = 'luxor2',
    --             chosenVehicle = 'luxor2'
    --         },
    --         [3] = {
    --             coords = vector4(-1632.02, -3144.48, 12.99, 31.08),
    --             defaultVehicle = 'nimbus',
    --             chosenVehicle = 'nimbus'
    --         },
    --         [4] = {
    --             coords = vector4(-1663.74, -3126.32, 12.99, 275.03),
    --             defaultVehicle = 'frogger',
    --             chosenVehicle = 'frogger'
    --         },
    --     },
    -- },
    
    -- ['truck'] = {
    --     ['Type'] = 'managed', -- no player interaction is required to purchase a car
    --     ['Zone'] = {
    --         ['Shape'] = {--polygon that surrounds the shop
    --             vector2(872.23, -1173.5),
    --             vector2(868.88, -1162.7),
    --             vector2(900.91, -1156.54),
    --             vector2(901.96, -1173.71),
    --             vector2(883.59, -1174.47),
    --             vector2(884.59, -1161.29),
    --             vector2(890.06, -1155.0),
    --             vector2(907.71, -1168.71)
    --         },
    --         ['minZ'] = 25.0, -- min height of the shop zone
    --         ['maxZ'] = 28.0, -- max height of the shop zone
    --         ['size'] = 5.75 -- size of the vehicles zones
    --     },
    --     ['Job'] = 'cardealer', -- Name of job or none
    --     ['ShopLabel'] = 'Truck Motor Shop', -- Blip name
    --     ['showBlip'] = true, -- true or false
    --     ['blipSprite'] = 477, -- Blip sprite
    --     ['blipColor'] = 2, -- Blip color
    --     ['Categories'] = { -- Categories available to browse
    --         ['truck'] = 'Truck',
    --     },
    --     ['TestDriveTimeLimit'] = 0.5, -- Time in minutes until the vehicle gets deleted
    --     ['Location'] = vector3(900.47, -1155.74, 25.16), -- Blip Location
    --     ['ReturnLocation'] = vector3(900.47, -1155.74, 25.16), -- Location to return vehicle, only enables if the vehicleshop has a job owned
    --     ['VehicleSpawn'] = vector4(909.35, -1181.58, 25.55, 177.57), -- Spawn location when vehicle is bought
    --     ['TestDriveSpawn'] = vector4(867.65, -1192.4, 25.37, 95.72), -- Spawn location for test drive
    --     ['ShowroomVehicles'] = {
    --         [1] = {
    --             coords = vector4(890.84, -1170.92, 25.08, 269.58), -- where the vehicle will spawn on display
    --             defaultVehicle = 'hauler', -- Default display vehicle
    --             chosenVehicle = 'hauler', -- Same as default but is dynamically changed when swapping vehicles
    --         },
    --         [2] = {
    --             coords = vector4(878.45, -1171.04, 25.05, 273.08),
    --             defaultVehicle = 'phantom',
    --             chosenVehicle = 'phantom'
    --         },
    --         [3] = {
    --             coords = vector4(880.44, -1163.59, 24.87, 273.08),
    --             defaultVehicle = 'mule',
    --             chosenVehicle = 'mule'
    --         },
    --         [4] = {
    --             coords = vector4(896.95, -1162.62, 24.98, 273.08),
    --             defaultVehicle = 'mixer',
    --             chosenVehicle = 'mixer'
    --         },
    --     },
    -- },
}
