package me.qwq.doghouse.flexmark.ext.fancyquote;

import org.jetbrains.annotations.NotNull;

import com.vladsch.flexmark.util.data.DataHolder;
import com.vladsch.flexmark.util.data.MutableDataHolder;
import com.vladsch.flexmark.util.data.MutableDataSetter;

public class FancyQuoteOptions implements MutableDataSetter {

    final public boolean fancyQuoteParser;
    final public String fancyQuoteDefaultType;
    final public String fancyQuoteDefaultClass;
    
    @Override
    public @NotNull MutableDataHolder setIn(@NotNull MutableDataHolder dataHolder) {
        dataHolder.set(FancyQuoteExtension.FANCY_QUOTE_PARSER, fancyQuoteParser);
        dataHolder.set(FancyQuoteExtension.FANCY_QUOTE_DEFAULT_TYPE, fancyQuoteDefaultType);
        dataHolder.set(FancyQuoteExtension.FANCY_QUOTE_DEFAULT_CLASS, fancyQuoteDefaultClass);
        return dataHolder;
    }
    
    public FancyQuoteOptions(DataHolder options) {
        fancyQuoteParser = FancyQuoteExtension.FANCY_QUOTE_PARSER.get(options);
        fancyQuoteDefaultType = FancyQuoteExtension.FANCY_QUOTE_DEFAULT_TYPE.get(options);
        fancyQuoteDefaultClass = FancyQuoteExtension.FANCY_QUOTE_DEFAULT_CLASS.get(options);
    }

}
