package ervu_dashboard.component.chart.label;

import ervu_dashboard.model.Font;
import ervu_dashboard.model.chart.round.label.ChartLabelModel;

import ru.cg.webbpm.modules.database.api.dao.option.LoadOptions;
import ru.cg.webbpm.modules.standard_annotations.editor.ColorEditor;

/**
 * @author Vitaly Chekushkin
 */
public abstract class AbstractRoundLabelConfiguration implements RoundLabelConfiguration {

  public Font font = Font.of("sans-serif", "500", 14);

  @ColorEditor
  public String color = "#FFFFFF";

  @Override
  public ChartLabelModel getLabelModel(LoadOptions loadOptions) {
    return new ChartLabelModel(
        getLabel(loadOptions),
        color,
        font
    );
  }

  abstract protected String getLabel(LoadOptions loadOptions);
}
