/* eslint-disable @typescript-eslint/no-explicit-any */
import React from 'react';
import MyCatalogFilterModal from '../MyCatalogFilterModal';
import { formatMessage } from '../../i18n';
import FilterArtist from '../../components/FilterArtist';
import styles from './styles';

export interface Props {
    selectedRawArtist: any | undefined;
    onArtistPress: (rawArtist: any) => void;
    onApplyPress: () => void;
    onBackPress: () => void;
    onResetPress: () => void;
}

const InviteUserArtistFilterModal = ({
    selectedRawArtist,
    onArtistPress,
    onApplyPress,
    onBackPress,
    onResetPress
}: Props) => {
    const selectedRawArtists = selectedRawArtist ? [selectedRawArtist] : [];
    return (
        // @ts-ignore
        <MyCatalogFilterModal
            title={formatMessage('filtering.artists')}
            isBackIcon
            isFiltersChanged
            isFiltersEqualToDefaults={false}
            onApply={onApplyPress}
            onBack={onBackPress}
            onReset={onResetPress}
        >
            <FilterArtist
                style={styles.filterArtist}
                artistsSelected={selectedRawArtists}
                onArtistPress={onArtistPress}
            />
        </MyCatalogFilterModal>
    );
};

export default InviteUserArtistFilterModal;
