<?php

namespace Planaday\Config;

trait BasicEnumMappedSetting {
	public function getSetting(OptionGroupEnum $enum):mixed{
		$mapping = $this->getEnumMapping();
		return $mapping["values"][$enum->value] ?? null;
	}

	/**
	 * @return array{values:mixed[], subGroups:array[], subGroupAliases:string[]}
	 */
	public abstract function getEnumMapping(): array;

}