<?php

namespace ThemeAtelier\DomainForSale\Admin\Views\Metabox;

use ThemeAtelier\DomainForSale\Admin\Framework\Classes\DOMAIN_FOR_SALE;

if (!defined('ABSPATH')) {
	die;
} // Cannot access directly.

/**
 * The Layout building class.
 */
class ListingLayout
{
	/**
	 * Layout metabox section.
	 *
	 * @param string $prefix The metabox key.
	 * @return void
	 */
	public static function section($prefix)
	{
		DOMAIN_FOR_SALE::createSection(
			$prefix,
			array(
				'fields' => array(
					array(
						'type'  => 'metabox_branding',
						'image' => DOMAIN_FOR_SALE_DIR_URL . 'src/Admin/assets/img/dfs-logo.svg',
						'after' => '<i class="icofont-life-ring"></i> Support',
						'link'  => 'https://themeatelier.net/contact',
						'class' => 'domain-for-sale-admin-header',
					),

					array(
						'id'      => 'listing_layout_preset',
						'type'    => 'layout_preset',
						'title'   => esc_html__('Choose Layout', 'domain-for-sale'),
						'class'   => 'domain-for-sale-layout-preset',
						'options' => array(
							'grid_layout'      => array(
								'image' => DOMAIN_FOR_SALE_DIR_URL . 'src/Admin/assets/img/grid.svg',
								'text'  => esc_html__('Grid Layout', 'domain-for-sale'),
								'option_demo_url'  => 'https://wpdomainforsale.com/domain-grid/',
							),
							'list_layout'  => array(
								'image' => DOMAIN_FOR_SALE_DIR_URL . 'src/Admin/assets/img/list.svg',
								'text'  => esc_html__('List Layout', 'domain-for-sale'),
								'option_demo_url'  => 'https://wpdomainforsale.com/domain-list/',
							),
						),
						'default' => 'grid_layout',
					),
				),
			)
		);
	}
}
