import {ComponentExporterImporter, PreloadedDynamicValues} from "../ComponentExporterImporter";
import {TestableData} from "../../store";
import {UserIDOptions} from "../../cards/conditions/UserID";
import {ExportImportTarget} from "../Exporters";

export class UserIDExporterImporter implements ComponentExporterImporter<TestableData<UserIDOptions>, TestableData<UserIDOptions>> {
    type = 'UserID'

    exportData(data: TestableData<UserIDOptions>, target: ExportImportTarget): TestableData<UserIDOptions> {
        return data
    }

    tagDynamicValues({options: {ids}}: TestableData<UserIDOptions>, target: ExportImportTarget): PreloadedDynamicValues {
        return {
            category: 'users',
            values: ids
        };
    }
}
