import { Priority, Featured } from 'src/data/globalTypes';
import type {
    CountryOfRecording,
    SongMetadata,
} from 'src/data/queries/nrSoundRecordingById/types';

export const mockContributions = [
    {
        accountId: 69304,
        accountName: 'Brown, Andrew John',
        contributorId: '04e2cc26-c2ff-4512-ba68-07a93bca920f',
        contributorName: 'Brown, Andrew John',
        contributorRelationship: Featured.MAIN_PERFORMER,
        countryOfContribution:
            'United Kingdom of Great Britain and Northern Ireland',
        countryOfContributionCode: 'GB',
        id: 'c0dac6bf-f113-42cc-a918-6217f723df88',
        instruments: ['Guitar'],
        isrc: 'USUM71608814',
        firstReleaseYear: 2020,
        lastModifiedAt: '2023-10-09T17:27:30.624Z',
        nrSrId: 'e170619e-ea14-4270-85d1-e6875fc9e8e0',
        primaryArtist: 'OneRepublic feat. Peter Gabriel',
        performanceName: null,
        priority: Priority.MEDIUM,
        srNameVersion: 'My Made Up Song (Live)',
        valid: true,
        evidence: null,
    },
];

export const mockMetadataState = {
    metadata: {
        fields: {
            id: '',
            featuredArtists: [
                {
                    id: 'b2f0ab95-53a6-4270-87fe-d041f57b2192',
                    name: 'Peter Gabriel',
                },
            ],
            mainArtist: 'OneRepublic feat. Peter Gabriel',
            primaryArtists: [
                {
                    id: '0a22b6d3-2677-48b2-96a2-01ad1918e5c8',
                    name: 'OneRepublic',
                },
            ],
            priority: 'MEDIUM',
            recordingTitle: 'My Made Up Song',
            countryOfLabel: '',
            countryOfMaster: 'GB',
            countriesOfRecording: [
                {
                    __typename: 'Territory',
                    territoryCodeA2: 'GB',
                    countryName:
                        'United Kingdom of Great Britain and Northern Ireland',
                } as CountryOfRecording,
            ],
            totalFeaturedPerformers: '',
            formattedDuration: '-',
            version: 'Live',
            recordingYear: '',
            firstReleaseYear: '2020',
            originalLabel: '',
            albumName: '',
            catalogNumber: '',
            recordingType: 'Audio',
        },
        errors: [],
    },
    contributors: {
        fields: mockContributions,
        errors: [],
    },
};

export const mockSoundRecording: SongMetadata = {
    __typename: 'NrSoundRecording',
    countryOfLabel: null,
    countryOfMaster: {
        __typename: 'Territory',
        territoryCodeA2: 'GB',
        countryName: 'United Kingdom of Great Britain and Northern Ireland',
    },
    countriesOfRecording: [
        {
            __typename: 'Territory',
            territoryCodeA2: 'GB',
            countryName: 'United Kingdom of Great Britain and Northern Ireland',
        },
    ],
    duration: null,
    featuredArtists: [
        {
            __typename: 'NrParticipant',
            id: 'b2f0ab95-53a6-4270-87fe-d041f57b2192',
            name: 'Peter Gabriel',
        },
    ],
    firstReleaseYear: 2020,
    id: 'e170619e-ea14-4270-85d1-e6875fc9e8e0',
    isrc: 'USUM71608814',
    mainArtist: 'OneRepublic feat. Peter Gabriel',
    primaryArtists: [
        {
            __typename: 'NrParticipant',
            id: '0a22b6d3-2677-48b2-96a2-01ad1918e5c8',
            name: 'OneRepublic',
        },
    ],
    originalLabel: '',
    priority: Priority.MEDIUM,
    recordingTitle: 'My Made Up Song',
    recordingType: 'Audio',
    albumName: '',
    catalogNumber: '',
    recordingYear: null,
    totalFeaturedPerformers: null,
    version: 'Live',
    contributions: [
        {
            __typename: 'NrContribution',
            contributorRelationship: Featured.MAIN_PERFORMER,
            countryOfPerformance: {
                __typename: 'Territory',
                territoryCodeA2: 'GB',
                countryName:
                    'United Kingdom of Great Britain and Northern Ireland',
            },
            id: 'c0dac6bf-f113-42cc-a918-6217f723df88',
            instruments: ['Guitar'],
            lastModifiedAt: '2023-10-09T17:27:30.624Z',
            nrContributor: {
                __typename: 'NrContributor',
                id: '04e2cc26-c2ff-4512-ba68-07a93bca920f',
                name: 'Brown, Andrew John',
                vendor: {
                    __typename: 'Vendor',
                    id: {
                        __typename: 'LabelId',
                        vendorId: 69304,
                    },
                    name: 'Brown, Andrew John',
                },
            },
            nrSoundRecording: {
                __typename: 'NrSoundRecording',
                id: 'e170619e-ea14-4270-85d1-e6875fc9e8e0',
                isrc: 'USUM71608814',
                firstReleaseYear: 2020,
                mainArtist: 'OneRepublic feat. Peter Gabriel',
                priority: Priority.MEDIUM,
                recordingTitle: 'My Made Up Song',
                version: 'Live',
            },
            performanceName: null,
            valid: true,
            evidence: null,
        },
    ],
};
