/**
 * Sample data for ThreadForm visual prototype.
 * Covers all scenarios: text analysis, PDF splitting, file validation,
 * clarification, multiple agents, status changes, doc checks.
 */
export const SAMPLE_THREAD_FORM = {
    form_id: 'tf_001',
    title: '2025 Tax Return',
    status: 'in_progress',
    created_at: '2025-01-10T09:00:00Z',
    updated_at: '2025-04-13T11:44:00Z',
    client: { name: 'Pubs Abayasiri', id: 'client_001' },
    agents: [
        { name: 'Katie Walsh', id: 'agent_001' },
        { name: 'Angela White', id: 'agent_002' },
    ],
    collected_data_selections: {
        'ct_hsbc': true,
        'ct_interest_2025': true,
        'ct_schwab': true,
        'ct_laundry': false,
        'ct_travel': true,
        'ct_cleaning': false,
        'ct_phone': true,
        'ct_wfh': true,
        'ct_bank_details': true,
    },
    tasks: [
        // ─── Task 1: Simple completed task ──────────────────────────
        {
            task_id: 'task_001',
            title: 'Complete Client Information Form - once per year',
            description: "Just a quick reminder (if you haven't done so already), we'll need you to complete one of the following information forms so that we can update our systems and software prior to making a start on your returns: New Clients: New Client Information Form",
            status: 'completed',
            completed_by: 'client_001',
            completed_at: '2025-02-28T14:00:00Z',
            sort_order: 1,
            created_at: '2025-01-10T09:00:00Z',
            created_by: 'agent_001',
            thread: [
                {
                    message_id: 'msg_001',
                    role: 'system',
                    type: 'status_change',
                    visibility: 'all',
                    status_change: { from: 'pending', to: 'in_progress' },
                    user_name: 'Katie Walsh',
                    time: '2025-01-10T09:00:00Z',
                },
                {
                    message_id: 'msg_002',
                    role: 'client',
                    type: 'comment',
                    visibility: 'all',
                    content_text: 'Received. Thankyou.',
                    user_name: 'Pubs Abayasiri',
                    user_id: 'client_001',
                    time: '2025-02-28T10:30:00Z',
                },
                {
                    message_id: 'msg_003',
                    role: 'agent',
                    type: 'comment',
                    visibility: 'all',
                    content_text: 'Received. Thankyou.',
                    user_name: 'Angela White',
                    user_id: 'agent_002',
                    time: '2025-02-28T14:00:00Z',
                },
            ],
        },
        // ─── Task 2: File uploads with AI analysis + PDF splitting ──
        {
            task_id: 'task_002',
            title: 'Upload income information for your tax return',
            description: 'Details of all overseas and Australian income including interest received, dividends, distributions, employment income (if applicable)',
            status: 'in_progress',
            sort_order: 2,
            created_at: '2025-01-10T09:00:00Z',
            created_by: 'agent_001',
            thread: [
                {
                    message_id: 'msg_010',
                    role: 'system',
                    type: 'status_change',
                    visibility: 'all',
                    status_change: { from: 'pending', to: 'in_progress' },
                    user_name: 'Katie Walsh',
                    time: '2025-01-10T13:31:00Z',
                },
                // Client uploads files
                {
                    message_id: 'msg_011',
                    role: 'client',
                    type: 'content',
                    visibility: 'all',
                    content_text: 'bank ineterest',
                    content_items: [
                        {
                            content_id: 'ct_hsbc',
                            type: 'file',
                            file: { file_id: 'f_001', file_name: 'hsbc_statement_everyday_savings.pdf', file_size: '100KB', mime_type: 'application/pdf' },
                            category: 'bank_interest',
                            category_label: 'Bank & Interest Income',
                        },
                        {
                            content_id: 'ct_interest_old',
                            type: 'file',
                            file: { file_id: 'f_002', file_name: 'Interest&TaxReport_2023-2024.pdf', file_size: '83KB', mime_type: 'application/pdf' },
                            category: 'bank_interest',
                            category_label: 'Bank & Interest Income',
                        },
                        {
                            content_id: 'ct_interest_2025',
                            type: 'file',
                            file: { file_id: 'f_003', file_name: 'Interest&TaxReport_2024-2025.pdf', file_size: '83KB', mime_type: 'application/pdf' },
                            category: 'bank_interest',
                            category_label: 'Bank & Interest Income',
                        },
                        {
                            content_id: 'ct_netbank',
                            type: 'file',
                            file: { file_id: 'f_006', file_name: 'NetBank - Interest & tax summary.pdf', file_size: '247KB', mime_type: 'application/pdf' },
                            category: 'bank_interest',
                            category_label: 'Bank & Interest Income',
                        },
                    ],
                    user_name: 'Pubs Abayasiri',
                    user_id: 'client_001',
                    time: '2025-03-09T19:24:00Z',
                },
                // Front-office doc check (client-visible)
                {
                    message_id: 'msg_012',
                    role: 'system',
                    type: 'doc_check',
                    visibility: 'all',
                    doc_check: {
                        content_ref: 'ct_interest_old',
                        status: 'issues',
                        summary: '1 issue found with Interest&TaxReport_2023-2024.pdf',
                        issues: [
                            { description: "The date range on this document (2023-2024) doesn't match the 2025 financial year." },
                        ],
                    },
                    time: '2025-03-09T19:25:00Z',
                },
                {
                    message_id: 'msg_012b',
                    role: 'system',
                    type: 'doc_check',
                    visibility: 'all',
                    doc_check: {
                        content_ref: 'ct_hsbc',
                        status: 'passed',
                        summary: 'All checks passed for hsbc_statement_everyday_savings.pdf',
                    },
                    time: '2025-03-09T19:25:00Z',
                },
                {
                    message_id: 'msg_012c',
                    role: 'system',
                    type: 'doc_check',
                    visibility: 'all',
                    doc_check: {
                        content_ref: 'ct_interest_2025',
                        status: 'passed',
                        summary: 'All checks passed for Interest&TaxReport_2024-2025.pdf',
                    },
                    time: '2025-03-09T19:25:00Z',
                },
                // Back-office AI analysis (agent only)
                {
                    message_id: 'msg_013',
                    role: 'system',
                    type: 'ai_analysis',
                    visibility: 'agent_only',
                    ai_analysis: {
                        items: [
                            {
                                content_ref: 'ct_hsbc',
                                classification: { document_type: 'Bank Statement', tags: ['bank_interest', 'hsbc'], confidence: 0.95 },
                                validation: {
                                    status: 'passed',
                                    checks: [
                                        { check_id: 'chk_01', name: 'Date Range', status: 'passed', description: 'Document covers FY2025', severity: 'info' },
                                        { check_id: 'chk_02', name: 'Name Match', status: 'passed', description: 'Name matches client record', severity: 'info' },
                                        { check_id: 'chk_03', name: 'Account Details', status: 'passed', description: 'BSB and account number present', severity: 'info' },
                                    ],
                                },
                                review_status: 'accepted',
                            },
                            {
                                content_ref: 'ct_interest_old',
                                classification: { document_type: 'Interest & Tax Report', tags: ['bank_interest'], confidence: 0.92 },
                                validation: {
                                    status: 'issues',
                                    checks: [
                                        { check_id: 'chk_04', name: 'Date Range', status: 'failed', description: 'Document covers 2023-2024, expected FY2025', severity: 'error' },
                                        { check_id: 'chk_05', name: 'Name Match', status: 'passed', description: 'Name matches client record', severity: 'info' },
                                    ],
                                },
                                review_status: 'sent_to_client',
                                sent_message_id: 'msg_012',
                            },
                            {
                                content_ref: 'ct_interest_2025',
                                classification: { document_type: 'Interest & Tax Report', tags: ['bank_interest'], confidence: 0.94 },
                                validation: {
                                    status: 'passed',
                                    checks: [
                                        { check_id: 'chk_06', name: 'Date Range', status: 'passed', description: 'Document covers FY2024-2025', severity: 'info' },
                                        { check_id: 'chk_07', name: 'Name Match', status: 'passed', description: 'Name matches client record', severity: 'info' },
                                    ],
                                },
                                review_status: 'accepted',
                            },
                        ],
                    },
                    time: '2025-03-09T19:26:00Z',
                },
                // More client uploads - shares
                {
                    message_id: 'msg_014',
                    role: 'client',
                    type: 'content',
                    visibility: 'all',
                    content_text: 'shares - AU',
                    content_items: [
                        {
                            content_id: 'ct_hnl',
                            type: 'file',
                            file: { file_id: 'f_010', file_name: 'Harvey_Norman_Holdings_Limited_2024_AGM_Proxy_Form.pdf', file_size: '361KB', mime_type: 'application/pdf' },
                            category: 'shares',
                            category_label: 'Shares & Dividends',
                        },
                        {
                            content_id: 'ct_mqg',
                            type: 'file',
                            file: { file_id: 'f_011', file_name: 'MQG_Dividend_Advice_2024_07_02.pdf', file_size: '59KB', mime_type: 'application/pdf' },
                            category: 'shares',
                            category_label: 'Shares & Dividends',
                        },
                    ],
                    user_name: 'Pubs Abayasiri',
                    user_id: 'client_001',
                    time: '2025-03-09T19:27:00Z',
                },
                // Client uploads combined PDF (triggers splitting)
                {
                    message_id: 'msg_015',
                    role: 'client',
                    type: 'content',
                    visibility: 'all',
                    content_text: 'shares - us',
                    content_items: [
                        {
                            content_id: 'ct_schwab',
                            type: 'file',
                            file: { file_id: 'f_020', file_name: 'schwab_transactons_2024-2025.pdf', file_size: '557KB', mime_type: 'application/pdf' },
                            category: 'shares',
                            category_label: 'Shares & Dividends',
                        },
                    ],
                    user_name: 'Pubs Abayasiri',
                    user_id: 'client_001',
                    time: '2025-03-09T19:28:00Z',
                },
                // AI analysis with PDF splitting (agent only)
                {
                    message_id: 'msg_016',
                    role: 'system',
                    type: 'ai_analysis',
                    visibility: 'agent_only',
                    ai_analysis: {
                        items: [
                            {
                                content_ref: 'ct_schwab',
                                classification: { document_type: 'Brokerage Statements (Combined)', tags: ['shares', 'us_income'], confidence: 0.88 },
                                validation: {
                                    status: 'passed',
                                    checks: [
                                        { check_id: 'chk_20', name: 'Date Range', status: 'passed', description: 'Covers 2024-2025', severity: 'info' },
                                    ],
                                },
                                split_items: [
                                    {
                                        content_id: 'ct_schwab_split_1',
                                        type: 'file',
                                        parent_content_id: 'ct_schwab',
                                        file: { file_id: 'f_020', file_name: 'schwab_transactons_2024-2025.pdf' },
                                        split_info: { page_range: 'Pages 1-4', label: 'Account Summary & Positions' },
                                        category: 'shares',
                                        category_label: 'Shares & Dividends',
                                    },
                                    {
                                        content_id: 'ct_schwab_split_2',
                                        type: 'file',
                                        parent_content_id: 'ct_schwab',
                                        file: { file_id: 'f_020', file_name: 'schwab_transactons_2024-2025.pdf' },
                                        split_info: { page_range: 'Pages 5-8', label: 'Dividend Income' },
                                        category: 'shares',
                                        category_label: 'Shares & Dividends',
                                    },
                                    {
                                        content_id: 'ct_schwab_split_3',
                                        type: 'file',
                                        parent_content_id: 'ct_schwab',
                                        file: { file_id: 'f_020', file_name: 'schwab_transactons_2024-2025.pdf' },
                                        split_info: { page_range: 'Pages 9-12', label: 'Capital Gains Transactions' },
                                        category: 'shares',
                                        category_label: 'Shares & Dividends',
                                    },
                                ],
                                review_status: 'pending',
                            },
                        ],
                    },
                    time: '2025-03-09T19:30:00Z',
                },
                // Client marks complete
                {
                    message_id: 'msg_017',
                    role: 'system',
                    type: 'status_change',
                    visibility: 'all',
                    status_change: { from: 'in_progress', to: 'completed' },
                    user_name: 'Pubs Abayasiri',
                    time: '2025-03-09T20:15:00Z',
                },
            ],
        },
        // ─── Task 3: Text input with AI extraction ──────────────────
        {
            task_id: 'task_003',
            title: 'Upload details of deductions for your tax return',
            description: 'Provide details of work deductions, hours worked from home, tax agent fees (excluding Expat Taxes), Superannuation deductions, Charitable donations and investment expenses',
            status: 'in_progress',
            sort_order: 3,
            created_at: '2025-01-10T09:00:00Z',
            created_by: 'agent_001',
            thread: [
                {
                    message_id: 'msg_030',
                    role: 'system',
                    type: 'status_change',
                    visibility: 'all',
                    status_change: { from: 'pending', to: 'in_progress' },
                    user_name: 'Katie Walsh',
                    time: '2025-01-10T13:31:00Z',
                },
                // Client submits text
                {
                    message_id: 'msg_031',
                    role: 'client',
                    type: 'comment',
                    visibility: 'all',
                    content_text: 'Work-related expenses\nLaundry cost without receipt 300\nTravel cost 2000km for work purpose\nOffice cleaning - $ 50 per month but no receipt\nStationary - cost that include with receipt\nAnything what you think of that you can clam without a receipt\n\nPhone and internet and percentage of work related\n$190 per month - 80% work\n\nNumber of hours working from home\n45 to 50 hours\n\nMy bank details are:\nBSB: 123-223\nAccount Number: 44412-222\nAccount Name: John Smith',
                    user_name: 'Pubs Abayasiri',
                    user_id: 'client_001',
                    time: '2025-03-09T19:00:00Z',
                },
                // Front-office text check (client-visible) — issue found in text snippet
                {
                    message_id: 'msg_031_check',
                    role: 'system',
                    type: 'doc_check',
                    visibility: 'all',
                    doc_check: {
                        content_ref: 'msg_031',
                        source_type: 'text',
                        status: 'issues',
                        summary: 'Issue found in your deduction details',
                        issues: [
                            {
                                description: 'Laundry deduction of $300 without a receipt exceeds the $150 substantiation threshold. Please provide a receipt or reduce the claim amount.',
                                text_snippet: 'Laundry cost without receipt 300',
                            },
                            {
                                description: 'Office cleaning claimed at $50/month without receipts. A diary or logbook may be required to substantiate this recurring expense.',
                                text_snippet: 'Office cleaning - $ 50 per month but no receipt',
                            },
                        ],
                    },
                    time: '2025-03-09T19:01:00Z',
                },
                // Back-office text extraction (agent only)
                {
                    message_id: 'msg_032',
                    role: 'system',
                    type: 'ai_analysis',
                    visibility: 'agent_only',
                    ai_analysis: {
                        items: [
                            {
                                content_ref: 'msg_031',
                                classification: { document_type: 'Work Deductions + Bank Details', tags: ['deductions', 'bank_details', 'wfh'], confidence: 0.91 },
                                validation: {
                                    status: 'issues',
                                    checks: [
                                        { check_id: 'chk_30', name: 'Receipt Requirement', status: 'warning', description: 'Multiple items claimed without receipts', severity: 'warning' },
                                        { check_id: 'chk_31', name: 'BSB Format', status: 'passed', description: 'BSB 123-223 is valid format', severity: 'info' },
                                    ],
                                },
                                extracted_data: [
                                    {
                                        category: 'Work Deductions',
                                        fields: [
                                            { key: 'laundry', label: 'Laundry', value: '$300', issue: 'No receipt - may require substantiation over $150', severity: 'warning' },
                                            { key: 'travel', label: 'Travel', value: '2,000 km', },
                                            { key: 'cleaning', label: 'Office Cleaning', value: '$50/month ($600/year)', issue: 'No receipt provided', severity: 'warning' },
                                            { key: 'stationery', label: 'Stationery', value: 'With receipt' },
                                        ],
                                    },
                                    {
                                        category: 'Phone & Internet',
                                        fields: [
                                            { key: 'monthly_cost', label: 'Monthly Cost', value: '$190' },
                                            { key: 'work_pct', label: 'Work %', value: '80%' },
                                            { key: 'annual_claim', label: 'Annual Claim', value: '$1,824' },
                                        ],
                                    },
                                    {
                                        category: 'WFH Hours',
                                        fields: [
                                            { key: 'hours', label: 'Hours per Week', value: '45-50' },
                                        ],
                                    },
                                    {
                                        category: 'Bank Details',
                                        fields: [
                                            { key: 'bsb', label: 'BSB', value: '123-223' },
                                            { key: 'account', label: 'Account Number', value: '44412-222' },
                                            { key: 'name', label: 'Account Name', value: 'John Smith' },
                                        ],
                                    },
                                ],
                                review_status: 'pending',
                            },
                        ],
                    },
                    time: '2025-03-09T19:02:00Z',
                },
                // Client also uploads some receipt files
                {
                    message_id: 'msg_033',
                    role: 'client',
                    type: 'content',
                    visibility: 'all',
                    content_items: [
                        {
                            content_id: 'ct_receipts',
                            type: 'file',
                            file: { file_id: 'f_030', file_name: 'receipts_stationery_2025.pdf', file_size: '120KB', mime_type: 'application/pdf' },
                            category: 'deductions',
                            category_label: 'Work Deductions',
                        },
                    ],
                    user_name: 'Pubs Abayasiri',
                    user_id: 'client_001',
                    time: '2025-03-09T19:05:00Z',
                },
            ],
        },
        // ─── Task 4: Clarification with numbered questions ──────────
        {
            task_id: 'task_004',
            title: 'Additional information needed for your tax return',
            description: 'Clarification and/or documentation needed based on our review of your submitted documents.',
            status: 'needs_attention',
            sort_order: 4,
            created_at: '2025-04-09T22:00:00Z',
            created_by: 'agent_001',
            due_date: '2025-04-17T00:00:00Z',
            thread: [
                {
                    message_id: 'msg_040',
                    role: 'system',
                    type: 'status_change',
                    visibility: 'all',
                    status_change: { from: 'pending', to: 'needs_attention' },
                    user_name: 'Katie Walsh',
                    time: '2025-04-09T22:06:00Z',
                },
                // Agent sends structured clarification
                {
                    message_id: 'msg_041',
                    role: 'agent',
                    type: 'clarification',
                    visibility: 'all',
                    clarification: {
                        questions: [
                            {
                                id: 'q_001',
                                text: 'Interest from Westpac Life #384473 amounting to $563.10 is additional income not included in your prefill. This account is listed as a 3rd party account, do you use or have access to these funds and should we be including this income in your return?',
                                ai_ref: { content_ref: 'ct_interest_2025', check_id: 'chk_extra_01' },
                                response: "No, those are my parent's account - I help manage their finance for them as they struggle to self-manage. I do not use any of their finances for myself.",
                                response_time: '2025-04-13T10:25:00Z',
                                response_by: 'Pubs Abayasiri',
                            },
                            {
                                id: 'q_002',
                                text: "Spouse income: Last year we reported that your wife's income was nil. Is it the same this year? We note that you have now been residents for the full year.",
                                response: "She has income now. She's on ~$150k/year but worked partial year and also has shared interest. Do you need her tax return?",
                                response_time: '2025-04-13T10:25:00Z',
                                response_by: 'Pubs Abayasiri',
                            },
                        ],
                    },
                    user_name: 'Katie Walsh',
                    user_id: 'agent_001',
                    time: '2025-04-09T22:06:00Z',
                },
                // Client marks complete
                {
                    message_id: 'msg_042',
                    role: 'system',
                    type: 'status_change',
                    visibility: 'all',
                    status_change: { from: 'needs_attention', to: 'completed' },
                    user_name: 'Pubs Abayasiri',
                    time: '2025-04-13T10:26:00Z',
                },
                // Agent reopens
                {
                    message_id: 'msg_043',
                    role: 'system',
                    type: 'status_change',
                    visibility: 'all',
                    status_change: { from: 'completed', to: 'needs_attention' },
                    user_name: 'Katie Walsh',
                    time: '2025-04-13T11:41:00Z',
                },
                // Agent follow-up
                {
                    message_id: 'msg_044',
                    role: 'agent',
                    type: 'comment',
                    visibility: 'all',
                    content_text: "Hi Pubs, we need to include your wife, Wan Chi's, taxable income in your return so the taxable income amount or a copy of her tax return will be appreciated.",
                    user_name: 'Katie Walsh',
                    user_id: 'agent_001',
                    time: '2025-04-13T11:44:00Z',
                },
            ],
        },
        // ─── Task 5: Pending task (no activity yet) ─────────────────
        {
            task_id: 'task_005',
            title: 'Overseas assets',
            description: 'Did you have overseas assets valued at AUD $50,000 at any time during the year? Please comment Yes or No. This includes money in the bank, shares, crypto currency and real estate',
            status: 'pending',
            sort_order: 5,
            created_at: '2025-01-10T09:00:00Z',
            created_by: 'agent_001',
            thread: [],
        },
        // ─── Task 6: Rental property with multiple file uploads ─────
        {
            task_id: 'task_006',
            title: 'Upload rental property information',
            description: "Details of any investment property income and expenses including: Rental property manager's annual income & expense statement for each property. Complete annual statements for any mortgage held over the property and details of the purpose of a...",
            status: 'completed',
            completed_by: 'client_001',
            completed_at: '2025-03-12T15:00:00Z',
            sort_order: 6,
            created_at: '2025-01-10T09:00:00Z',
            created_by: 'agent_001',
            thread: [
                {
                    message_id: 'msg_060',
                    role: 'client',
                    type: 'content',
                    visibility: 'all',
                    content_text: 'depreciation schedule',
                    content_items: [
                        {
                            content_id: 'ct_rental_deprec',
                            type: 'file',
                            file: { file_id: 'f_060', file_name: 'depreciation_schedule_2025.pdf', file_size: '180KB', mime_type: 'application/pdf' },
                            category: 'rental',
                            category_label: 'Rental Property',
                        },
                        {
                            content_id: 'ct_rental_statement',
                            type: 'file',
                            file: { file_id: 'f_061', file_name: 'rental_annual_statement.pdf', file_size: '95KB', mime_type: 'application/pdf' },
                            category: 'rental',
                            category_label: 'Rental Property',
                        },
                    ],
                    user_name: 'Pubs Abayasiri',
                    user_id: 'client_001',
                    time: '2025-03-12T14:00:00Z',
                },
                {
                    message_id: 'msg_061',
                    role: 'system',
                    type: 'doc_check',
                    visibility: 'all',
                    doc_check: {
                        content_ref: 'ct_rental_deprec',
                        status: 'passed',
                        summary: 'All checks passed for depreciation_schedule_2025.pdf',
                    },
                    time: '2025-03-12T14:01:00Z',
                },
                {
                    message_id: 'msg_062',
                    role: 'system',
                    type: 'doc_check',
                    visibility: 'all',
                    doc_check: {
                        content_ref: 'ct_rental_statement',
                        status: 'passed',
                        summary: 'All checks passed for rental_annual_statement.pdf',
                    },
                    time: '2025-03-12T14:01:00Z',
                },
                {
                    message_id: 'msg_063',
                    role: 'system',
                    type: 'ai_analysis',
                    visibility: 'agent_only',
                    ai_analysis: {
                        items: [
                            {
                                content_ref: 'ct_rental_deprec',
                                classification: { document_type: 'Depreciation Schedule', tags: ['rental', 'depreciation'], confidence: 0.97 },
                                validation: {
                                    status: 'passed',
                                    checks: [
                                        { check_id: 'chk_60', name: 'Date Range', status: 'passed', description: 'Covers FY2025', severity: 'info' },
                                        { check_id: 'chk_61', name: 'Property Address', status: 'passed', description: 'Address consistent', severity: 'info' },
                                    ],
                                },
                                review_status: 'accepted',
                            },
                            {
                                content_ref: 'ct_rental_statement',
                                classification: { document_type: 'Rental Statement', tags: ['rental', 'income'], confidence: 0.93 },
                                validation: {
                                    status: 'passed',
                                    checks: [
                                        { check_id: 'chk_62', name: 'Date Range', status: 'passed', description: 'Covers FY2025', severity: 'info' },
                                    ],
                                },
                                review_status: 'accepted',
                            },
                        ],
                    },
                    time: '2025-03-12T14:02:00Z',
                },
            ],
        },
    ],
};
//# sourceMappingURL=sample_data.js.map