package org.implab.gradle.variants.artifacts.internal;

import java.util.Collection;
import java.util.Set;
import java.util.function.Consumer;
import java.util.function.Function;

import org.implab.gradle.variants.artifacts.ArtifactSlot;
import org.implab.gradle.variants.core.VariantsView;
import org.implab.gradle.variants.sources.CompileUnit;
import org.implab.gradle.variants.sources.VariantSourcesContext;

public class SlotInputsAssembler implements SlotContributionVisitor {

    VariantsView variantView;
    VariantSourcesContext sources;
    ArtifactSlot artifactSlot;

    Set<SlotInputKey> seen;

    @Override
    public void visit(DirectContribution contribution) {
        contribute(
                SlotInputKey.newUniqueKey("Direct input for " + artifactSlot),
                contribution.input());
    }

    @Override
    public void visit(VariantOutputsContribution contribution) {
        sources.getCompileUnits().getUnitsForVariant(artifactSlot.variant()).stream()
    }

    @Override
    public void visit(RoleOutputsContribution contribution) {
        // TODO Auto-generated method stub
        throw new UnsupportedOperationException("Unimplemented method 'visit'");
    }

    @Override
    public void visit(LayerOutputsContribution contribution) {
        // TODO Auto-generated method stub
        throw new UnsupportedOperationException("Unimplemented method 'visit'");
    }

    private void contribute(SlotInputKey key, Object input) {

    }

    private Function<CompileUnit, Object> resolveOutputs(Collection<? extends String> outputs) {
        return unit -> {

        };
    }

}
