<?php

namespace Planaday\Config;

use Planaday\Utility\DataGrouping\Collection;
use Planaday\Utility\Debug\Log\Logging;

trait BasicSettingsLog {
	use Logging;
	protected Collection $usageLog;

	public function getUsageLog(): Collection {
		if ( !isset($this->usageLog) ) $this->usageLog = new Collection();
		return $this->usageLog;
	}

	protected function logUse( OptionGroupEnum $enum ): void{
		if ( !isset($this->usageLog) ) $this->usageLog = new Collection();
		if ( $this->usageLog->contains($enum) ) return;
		$this->usageLog->append( $enum );
	}
}