
{
    "id": "traffic-infraction-report",
    "title": "Traffic Infraction Report",
    "description": "Generate a traffic citation report.",
    "icon": "TrafficCone",
    "icon_color": "#f97316",
    "is_html_output": true,
    "custom_button_text": "Open MDC Record",
    "custom_button_link": "https://mdc.gta.world/record/{{defendant_name}}",
    "custom_button_replace_spaces": true,
    "output": "<table style=\"width:100%;font-family:'Times New Roman',serif;border-collapse:collapse;border:4px solid black;background-color:white;color:black;\"><tbody><tr><td colspan=\"3\" style=\"text-align:center;padding-bottom:2rem\"><h1 style=\"font-family:Arial,sans-serif;font-size:2rem;font-weight:700;text-transform:uppercase;margin:0\">COUNTY OF LOS SANTOS</h1><h2 style=\"font-family:Arial,sans-serif;font-size:1.5rem;font-weight:600;margin:0\">Traffic Citation Report</h2></td></tr><tr><td colspan=\"3\" style=\"border-top:2px solid black;padding:.5rem\"><h3 style=\"font-family:Arial,sans-serif;font-weight:700;font-size:1.125rem;margin-bottom:.5rem\">1. GENERAL INFORMATION</h3><table style=\"width:100%;border-collapse:collapse\"><tbody><tr><td style=\"border:1px solid black;padding:.5rem;width:33.33%\"><strong style=\"font-family:Arial,sans-serif\">A. DATE:</strong> {{general.date}}</td><td style=\"border:1px solid black;padding:.5rem;width:33.33%\"><strong style=\"font-family:Arial,sans-serif\">B. TIME (24HR):</strong> {{general.time}}</td><td style=\"border:1px solid black;padding:.5rem;width:33.33%\"><strong style=\"font-family:Arial,sans-serif\">C. CALLSIGN:</strong> {{general.callSign}}</td></tr></tbody></table></td></tr><tr><td colspan=\"3\" style=\"border-top:2px solid black;padding:.5rem\"><h3 style=\"font-family:Arial,sans-serif;font-weight:700;font-size:1.125rem;margin-bottom:.5rem\">2. OFFICER INFORMATION</h3><table style=\"width:100%;border-collapse:collapse\"><tbody>{{#each officers}}<tr><td style=\"border:1px solid black;padding:.5rem;width:41.66%\"><strong style=\"font-family:Arial,sans-serif\">A. OFFICER NAME:</strong> {{this.name}}</td><td style=\"border:1px solid black;padding:.5rem;width:33.33%\"><strong style=\"font-family:Arial,sans-serif\">B. RANK:</strong> {{this.rank}}</td><td style=\"border:1px solid black;padding:.5rem;width:25%\"><strong style=\"font-family:Arial,sans-serif\">C. BADGE:</strong> #{{this.badgeNumber}}</td></tr>{{/each}}</tbody></table></td></tr><tr><td colspan=\"3\" style=\"border-top:2px solid black;padding:.5rem\"><h3 style=\"font-family:Arial,sans-serif;font-weight:700;font-size:1.125rem;margin-bottom:.5rem\">3. DEFENDANT INFORMATION</h3><table style=\"width:100%;border-collapse:collapse\"><tbody><tr><td style=\"border:1px solid black;padding:.5rem;width:50%\"><strong style=\"font-family:Arial,sans-serif\">A. FULL NAME:</strong> {{defendant_name}}</td><td style=\"border:1px solid black;padding:.5rem;width:50%\"><strong style=\"font-family:Arial,sans-serif\">B. LICENSE STATUS:</strong> {{defendant_license_status}}</td></tr></tbody></table></td></tr><tr><td colspan=\"3\" style=\"border-top:2px solid black;padding:.5rem\"><h3 style=\"font-family:Arial,sans-serif;font-weight:700;font-size:1.125rem;margin-bottom:.5rem\">4. VEHICLE INFORMATION</h3><table style=\"width:100%;border-collapse:collapse\"><tbody><tr><td style=\"border:1px solid black;padding:.5rem;width:50%\"><strong style=\"font-family:Arial,sans-serif\">A. MAKE & MODEL:</strong> {{vehicle_make_model}}</td><td style=\"border:1px solid black;padding:.5rem;width:50%\"><strong style=\"font-family:Arial,sans-serif\">B. IDENTIFICATION PLATE:</strong> {{#if vehicle_plate}}{{vehicle_plate}}{{else}}N/A{{/if}}</td></tr><tr><td style=\"border:1px solid black;padding:.5rem;width:50%\"><strong style=\"font-family:Arial,sans-serif\">C. REGISTERED OWNER:</strong> {{#if vehicle_owner}}{{vehicle_owner}}{{else}}N/A{{/if}}</td><td style=\"border:1px solid black;padding:.5rem;width:50%\"><strong style=\"font-family:Arial,sans-serif\">D. REGISTRATION:</strong> {{#if vehicle_registered}}Valid{{else}}Invalid{{/if}}</td></tr><tr><td style=\"border:1px solid black;padding:.5rem;width:50%\"><strong style=\"font-family:Arial,sans-serif\">E. INSURANCE:</strong> {{#if vehicle_insured}}Insured{{else}}Uninsured (Expired: {{insurance_expired_date}} {{insurance_expired_time}}){{/if}}</td><td style=\"border:1px solid black;padding:.5rem;width:50%\"><strong style=\"font-family:Arial,sans-serif\">F. TINT LEVEL:</strong> {{vehicle_tint_level}}</td></tr></tbody></table></td></tr><tr><td colspan=\"3\" style=\"border-top:2px solid black;padding:.5rem\"><h3 style=\"font-family:Arial,sans-serif;font-weight:700;font-size:1.125rem;margin-bottom:.5rem\">5. LOCATION OF CITATION</h3><table style=\"width:100%;border-collapse:collapse\"><tbody><tr><td style=\"border:1px solid black;padding:.5rem;width:50%\"><strong style=\"font-family:Arial,sans-serif\">A. DISTRICT:</strong> {{location.district}}</td><td style=\"border:1px solid black;padding:.5rem;width:50%\"><strong style=\"font-family:Arial,sans-serif\">B. STREET:</strong> {{location.street}}</td></tr></tbody></table></td></tr><tr><td colspan=\"3\" style=\"border-top:2px solid black;padding:.5rem\"><h3 style=\"font-family:Arial,sans-serif;font-weight:700;font-size:1.125rem;margin-bottom:.5rem\">6. CITATIONS</h3><table style=\"width:100%;border-collapse:collapse;border:1px solid black\"><thead style=\"background-color:#e5e7eb\"><tr><th style=\"border:1px solid black;padding:.5rem;font-family:Arial,sans-serif\">CHARGE DESCRIPTION</th><th style=\"border:1px solid black;padding:.5rem;font-family:Arial,sans-serif\">FINE</th></tr></thead><tbody>{{#each charges}}<tr><td style=\"border:1px solid black;padding:.5rem\">IC {{chargeId}}. {{#with (lookup @root.penalCode chargeId)}}{{this.charge}}{{/with}}</td><td style=\"border:1px solid black;padding:.5rem\">${{fine}}</td></tr>{{/each}}</tbody></table></td></tr><tr><td colspan=\"3\" style=\"border-top:2px solid black;padding:.5rem\"><h3 style=\"font-family:Arial,sans-serif;font-weight:700;font-size:1.125rem;margin-bottom:.5rem\">7. NARRATIVE</h3><p style=\"border:1px solid black;padding:.5rem;min-height:150px;white-space:pre-wrap;margin:0\">{{narrative}}</p></td></tr><tr><td colspan=\"3\" style=\"border-top:2px solid black;padding:.5rem\"><h3 style=\"font-family:Arial,sans-serif;font-weight:700;font-size:1.125rem;margin-bottom:.5rem\">8. EVIDENCE</h3><p style=\"border:1px solid black;padding:.5rem;min-height:100px;white-space:pre-wrap;margin:0 0 0.5rem 0\"><b>A. Dashboard Camera:</b><br/>{{evidence.dashcam}}</p><p style=\"border:1px solid black;padding:.5rem;min-height:100px;white-space:pre-wrap;margin:0\"><b>B. Additional Evidence:</b><br/>{{evidence.additional}}</p></td></tr></tbody></table>",
    "form": [
        { "type": "hidden", "name": "generatorType", "value": "TrafficReport" },
        { "type": "section", "title": "General Section" },
        { "type": "general", "name": "general" },
        { "type": "section", "title": "Officer Section" },
        { "type": "officer", "name": "officers", "showBadgeNumber": true },
        { "type": "section", "title": "Defendant & Narrative" },
        { "type": "text", "name": "defendant_name", "label": "Defendant's Full Name", "placeholder": "Firstname Lastname", "required": true },
        { "type": "dropdown", "name": "defendant_license_status", "label": "Driver's License Status", "placeholder": "Select License Status", "options": ["Valid", "No License", "Expired", "Suspended", "Revoked"], "required": true },
        { "type": "textarea", "name": "narrative", "label": "Traffic Stop Narrative", "placeholder": "Witnessed the defendant to be...", "required": true },
        { "type": "section", "title": "Location Details" },
        { 
            "type": "location", 
            "name": "location", 
            "showDistrict": true 
        },
        { "type": "section", "title": "Vehicle Details" },
        { "type": "group", "fields": [
            { "type": "better-switch", "name": "vehicle_registered", "label": "Registration Status", "dataOn": "Registered", "dataOff": "Unregistered", "defaultValue": true },
            { "type": "text", "name": "vehicle_owner", "label": "Registered Owner", "placeholder": "Firstname Lastname", "stipulation": {"field": "vehicle_registered", "value": true}},
            { "type": "text", "name": "vehicle_plate", "label": "Identification Plate", "placeholder": "###XXX", "stipulation": {"field": "vehicle_registered", "value": true}}
          ]
        },
        { "type": "group", "fields": [
            { "type": "better-switch", "name": "vehicle_insured", "label": "Insurance Status", "dataOn": "Insured", "dataOff": "Uninsured", "defaultValue": true },
            { "type": "text", "name": "insurance_expired_date", "label": "Insurance Expired Date", "placeholder": "DD/MM/YYYY", "stipulation": {"field": "vehicle_insured", "value": false}},
            { "type": "text", "name": "insurance_expired_time", "label": "Insurance Expired Time", "placeholder": "XX:XX", "stipulation": {"field": "vehicle_insured", "value": false}}
          ]
        },
        { "type": "group", "fields": [
            { "type": "datalist", "name": "vehicle_make_model", "label": "Make & Model", "placeholder": "e.g. Benefactor Dubsta", "optionsSource": "vehicles", "required": true },
            { 
                "type": "dropdown", 
                "name": "vehicle_tint_level", 
                "label": "Tint Level", 
                "placeholder": "Select Tint Level",
                "defaultValue": "Uninspected",
                "options": [
                    "Uninspected",
                    {
                        "label": "Legal",
                        "items": ["Level 0", "Level 3", "Level 4", "Level 5"]
                    },
                    {
                        "label": "Illegal",
                        "items": ["Level 1", "Level 2"]
                    }
                ], 
                "required": true 
            }
        ]},
        { "type": "section", "title": "Charges" },
        { 
            "type": "charge",
            "name": "charges",
            "showClass": true,
            "showOffense": true,
            "allowedTypes": { "M": false, "I": true },
            "allowedIds": "401-429,435-442",
            "customFields": [
                {
                    "type": "text",
                    "name": "fine",
                    "label": "Fine",
                    "placeholder": "Fine Amount"
                }
            ],
              "previewFields": {
                  "fine": true,
                  "impound": true,
                  "suspension": true
              },
              "copyable_charge": true
          },
        { "type": "section", "title": "Evidence" },
        {
            "type": "group",
            "fields": [
                {
                    "type": "textarea", 
                    "name": "evidence.dashcam", 
                    "label": "Dashboard Camera", 
                    "placeholder": "The dashboard camera captures audio and video footage showcasing...", 
                    "required": true 
                },
                { 
                    "type": "textarea", 
                    "name": "evidence.additional", 
                    "label": "Additional Evidence", 
                    "placeholder": "Provide links to any additional evidence (videos, photographs, etc.)...", 
                    "required": false 
                }
            ]
        }
    ],
    "countyCityStipulation": true
}

    