<?php

require_once get_theme_file_path( 'inc/block-styles.php' );
require_once get_theme_file_path( 'inc/contact-form-pattern.php' );
require_once get_theme_file_path( 'inc/pattern-categories.php' );

function absolute_2026_setup(): void {
	load_theme_textdomain( 'absolute-2026', get_parent_theme_file_path( 'languages' ) );
	remove_theme_support( 'core-block-patterns' );
}

add_action( 'after_setup_theme', 'absolute_2026_setup' );

add_filter( 'should_load_remote_block_patterns', '__return_false' );

function absolute_2026_enqueue_styles(): void {
	wp_enqueue_style(
		'absolute-2026',
		get_stylesheet_uri(),
		[],
		filemtime( get_stylesheet_directory() . '/style.css' )
	);
}

add_action( 'enqueue_block_assets', 'absolute_2026_enqueue_styles' );

function absolute_2026_enqueue_reveal_script(): void {
	$reveal_script_path = get_theme_file_path( 'assets/js/reveal.js' );

	wp_enqueue_script(
		'absolute-2026-reveal',
		get_theme_file_uri( 'assets/js/reveal.js' ),
		[],
		filemtime( $reveal_script_path ),
		false
	);
}

add_action( 'wp_enqueue_scripts', 'absolute_2026_enqueue_reveal_script' );
