<?php

namespace NeurogenesisTheme\QuickSetup\Steps;

use NeurogenesisTheme\Helpers\ThemeOptions;
use NeurogenesisTheme\QuickSetup\Step;

defined( 'ABSPATH' ) || exit;

final class CustomizeTheme extends Step {

	public function id(): string {
		return 'customize';
	}

	public function label(): string {
		return __( 'Customize colors and typography', 'thinko' );
	}

	public function url(): string {
		return admin_url( 'customize.php' );
	}

	public function completed(): bool {
		$filtered = $this->filtered_completed( 'neurogenesis_theme_quick_setup_customize_completed' );
		if ( null !== $filtered ) {
			return $filtered;
		}

		return (bool) ThemeOptions::get( ThemeOptions::THEME_CUSTOMIZED, false );
	}

	public static function mark_completed(): void {
		ThemeOptions::set( ThemeOptions::THEME_CUSTOMIZED, true );
	}
}
