package com.atlassian.bitbucket.stp;

import com.atlassian.support.tools.spi.SupportInfoBuilder;

import java.util.HashMap;
import java.util.Map;

public class SimpleSupportInfoBuilder implements SupportInfoBuilder {
    private final Map<String, Object> valuesAndSubCategories = new HashMap<String, Object>();

    @Override
    public SupportInfoBuilder addValue(String s, String s2) {
        valuesAndSubCategories.put(s, s2);
        return this;
    }

    @Override
    public SupportInfoBuilder addCategory(String s) {
        SimpleSupportInfoBuilder sub = new SimpleSupportInfoBuilder();
        valuesAndSubCategories.put(s, sub.valuesAndSubCategories);
        return sub;
    }

    @Override
    public <T> SupportInfoBuilder addContext(T t) {
        return this;
    }

    public Map<String, Object> getValuesAndSubCategories() {
        return valuesAndSubCategories;
    }
}
