<?php

namespace WPDesk\FakturyKSEF\Dashboard;

use WPDeskKSEFVendor\WPDesk\PluginBuilder\Plugin\Hookable;
use WPDesk\CoreAlias\FieldSettingsTab;

class SettingsPageRegistry implements Hookable {

	private SettingsTab $ksef_settings_tab;

	public function __construct( SettingsTab $ksef_settings ) {
		$this->ksef_settings_tab = $ksef_settings;
	}

	public function hooks() {
		add_filter( 'fi/core/ksef/tabs', [ $this, 'add_setting_tab' ] );
	}

	public function add_setting_tab( $tabs ) {
		$tabs[ SettingsTab::get_tab_slug() ] = $this->ksef_settings_tab;

		return $tabs;
	}
}
