import {Account, List} from "projects/mastodon-api/src/public-api";

export interface Filters {
    username: string;
    freeText: ReadonlyArray<string>;
    lists: ReadonlyArray<string>;
    unlisted: boolean;
}

export interface ApplicationState {
    listsLoading: boolean;
    listAccountsLoading: boolean;
    followingsLoading: boolean;
    lists: ReadonlyArray<List>;
    listsAccounts: { [listId: string]: string[] };
    followings: ReadonlyArray<Account>;
    filters: Filters;
}

export const initialState: ApplicationState = {
    listsLoading: false,
    listAccountsLoading: false,
    followingsLoading: false,
    lists: [],
    listsAccounts: {},
    followings: [],
    filters: {
        username: '',
        freeText: [],
        lists: [],
        unlisted: false,
    }
}
