<?php
/**
 * Register default widgets.
 *
 * @package AuraBuilder
 */

declare(strict_types=1);

namespace AuraBuilder\Widgets;

use AuraBuilder\Widgets\Basic\AccordionWidget;
use AuraBuilder\Widgets\Basic\AdvancedAccordionWidget;
use AuraBuilder\Widgets\Basic\AlertWidget;
use AuraBuilder\Widgets\Basic\ButtonWidget;
use AuraBuilder\Widgets\Basic\CarouselWidget;
use AuraBuilder\Widgets\Basic\CommentsFormWidget;
use AuraBuilder\Widgets\Basic\ContainerWidget;
use AuraBuilder\Widgets\Basic\CounterWidget;
use AuraBuilder\Widgets\Basic\CreativeCardsWidget;
use AuraBuilder\Widgets\Basic\DividerWidget;
use AuraBuilder\Widgets\Basic\DynamicWidget;
use AuraBuilder\Widgets\Basic\EmbedWidget;
use AuraBuilder\Widgets\Basic\GalleryWidget;
use AuraBuilder\Widgets\Basic\HeadingWidget;
use AuraBuilder\Widgets\Basic\HtmlWidget;
use AuraBuilder\Widgets\Basic\IconBoxWidget;
use AuraBuilder\Widgets\Basic\IconListWidget;
use AuraBuilder\Widgets\Basic\IconWidget;
use AuraBuilder\Widgets\Basic\ImageBoxWidget;
use AuraBuilder\Widgets\Basic\ImageCarouselProWidget;
use AuraBuilder\Widgets\Basic\ImageFloatWidget;
use AuraBuilder\Widgets\Basic\ImageOverlayWidget;
use AuraBuilder\Widgets\Basic\ImageWidget;
use AuraBuilder\Widgets\Basic\InfoBoxWidget;
use AuraBuilder\Widgets\Basic\LoopGridWidget;
use AuraBuilder\Widgets\Basic\MapsWidget;
use AuraBuilder\Widgets\Basic\MenuAnchorWidget;
use AuraBuilder\Widgets\Basic\NavMenuWidget;
use AuraBuilder\Widgets\Basic\PageContentWidget;
use AuraBuilder\Widgets\Basic\PopupWidget;
use AuraBuilder\Widgets\Basic\PreviewCardWidget;
use AuraBuilder\Widgets\Basic\ProgressBarWidget;
use AuraBuilder\Widgets\Basic\RootWidget;
use AuraBuilder\Widgets\Basic\SectionWidget;
use AuraBuilder\Widgets\Basic\ShortcodeWidget;
use AuraBuilder\Widgets\Basic\SidebarWidget;
use AuraBuilder\Widgets\Basic\SocialBarWidget;
use AuraBuilder\Widgets\Basic\SocialIconsWidget;
use AuraBuilder\Widgets\Basic\SpacerWidget;
use AuraBuilder\Widgets\Basic\StarRatingWidget;
use AuraBuilder\Widgets\Basic\TabsWidget;
use AuraBuilder\Widgets\Basic\TestimonialWidget;
use AuraBuilder\Widgets\Basic\TextAnimationWidget;
use AuraBuilder\Widgets\Basic\TextPathWidget;
use AuraBuilder\Widgets\Basic\TextWidget;
use AuraBuilder\Widgets\Basic\ToggleWidget;
use AuraBuilder\Widgets\Basic\VideoWidget;

final class WidgetBootstrap {

	public static function register_defaults(): void {
		$r = WidgetRegistry::instance();
		// Layout.
		$r->register( new RootWidget() );
		$r->register( new SectionWidget() );
		$r->register( new ContainerWidget() );
		// Basic (Elementor-like).
		$r->register( new HeadingWidget() );
		$r->register( new TextWidget() );
		$r->register( new ImageWidget() );
		$r->register( new VideoWidget() );
		$r->register( new ButtonWidget() );
		$r->register( new StarRatingWidget() );
		$r->register( new DividerWidget() );
		$r->register( new MapsWidget() );
		$r->register( new IconWidget() );
		$r->register( new ImageBoxWidget() );
		$r->register( new IconBoxWidget() );
		$r->register( new GalleryWidget() );
		$r->register( new CarouselWidget() );
		$r->register( new IconListWidget() );
		$r->register( new CounterWidget() );
		$r->register( new SpacerWidget() );
		$r->register( new TestimonialWidget() );
		$r->register( new TabsWidget() );
		$r->register( new AccordionWidget() );
		$r->register( new ToggleWidget() );
		$r->register( new SocialIconsWidget() );
		$r->register( new ProgressBarWidget() );
		$r->register( new ShortcodeWidget() );
		$r->register( new HtmlWidget() );
		$r->register( new MenuAnchorWidget() );
		$r->register( new AlertWidget() );
		$r->register( new SidebarWidget() );
		$r->register( new TextPathWidget() );
		$r->register( new PopupWidget() );
		$r->register( new CommentsFormWidget() );
		// Creative (Turbo Addons–inspired).
		$r->register( new CreativeCardsWidget() );
		$r->register( new AdvancedAccordionWidget() );
		$r->register( new PreviewCardWidget() );
		$r->register( new InfoBoxWidget() );
		$r->register( new SocialBarWidget() );
		$r->register( new TextAnimationWidget() );
		$r->register( new ImageFloatWidget() );
		$r->register( new ImageOverlayWidget() );
		$r->register( new ImageCarouselProWidget() );
		$r->register( new NavMenuWidget() );
		// Dynamic + embeds.
		$r->register( new LoopGridWidget() );
		$r->register( new PageContentWidget() );
		$r->register( new DynamicWidget() );
		$r->register( new EmbedWidget() );

		/**
		 * Third-party widgets: do_action( 'aptb_register_widgets', $registry );
		 */
		do_action( 'aptb_register_widgets', $r );
	}
}
