<?php
/**
 * Module: JetSmartFilters Checkboxes Filter.
 */
namespace Jet_Engine_Divi_Views\Components\Jet_Smart_Filters\Modules;

if ( ! defined( 'ABSPATH' ) ) {
	die( 'Direct access forbidden.' );
}

use ET\Builder\Framework\DependencyManagement\Interfaces\DependencyInterface;
use ET\Builder\Packages\ModuleLibrary\ModuleRegistration;
use ET\Builder\Packages\Module\Module;
use ET\Builder\FrontEnd\BlockParser\BlockParserStore;
use ET\Builder\FrontEnd\Module\Style;
use ET\Builder\Packages\Module\Options\Text\TextStyle;
use Jet_Engine_Divi_Views\Utils;

class Checkboxes_Filter implements DependencyInterface {

	private static function get_default_settings() {

		return [
			'filter_id'                   => 0,
			'content_provider'            => 'not-selected',
			'apply_type'                  => 'ajax',
			'apply_on'                    => 'value',
			'apply_button'                => true,
			'apply_button_text'           => __( 'Apply filter', 'jet-smart-filters' ),
			'show_label'                  => false,
			'query_id'                    => '',
			'clear_item'                  => true,
			'apply_indexer'               => false,
			'show_counter'                => false,
			'counter_prefix'              => '(',
			'counter_suffix'              => ')',
			'show_items_rule'             => 'show',
			'change_items_rule'           => 'always',
			'show_items_label'            => true,
			'filter_image_size'           => 'full',
			'enable_items'                => true,
			'enable_prev_next'            => true,
			'hide_inactive_prev_next'     => true,
			'enable_load_more'            => false,
			'autoscroll'                  => true,
			'search_enabled'              => false,
			'moreless_enabled'            => false,
			'dropdown_enabled'            => false,
			'dropdown_n_selected_enabled' => false,
			'dropdown_apply_button'       => false,
			'scroll_enabled'              => false,
		];
	}

	private static function normalize_toggle_value( $value ) {

		if ( is_bool( $value ) ) {
			return $value;
		}

		if ( is_numeric( $value ) ) {
			return (bool) absint( $value );
		}

		if ( ! is_string( $value ) ) {
			return $value;
		}

		$normalized = strtolower( trim( $value ) );

		if ( in_array( $normalized, [ 'on', 'true', 'yes' ], true ) ) {
			return true;
		}

		if ( in_array( $normalized, [ 'off', 'false', 'no', '' ], true ) ) {
			return false;
		}

		return $value;
	}

	private static function get_prepared_attrs( $attrs ) {

		$prepared_attrs = [];

		foreach ( $attrs as $key => $value ) {
			if ( isset( $value['innerContent']['desktop']['value'] ) ) {
				$prepared_attrs[ $key ] = $value['innerContent']['desktop']['value'];
			}
		}

		$prepared_attrs = wp_parse_args( $prepared_attrs, self::get_default_settings() );

		foreach ( [
			'apply_button',
			'hide_apply_button',
			'apply_redirect',
			'show_label',
			'clear_item',
			'additional_providers_enabled',
			'apply_indexer',
			'show_counter',
			'show_items_label',
			'enable_items',
			'enable_prev_next',
			'hide_inactive_prev_next',
			'enable_load_more',
			'autoscroll',
			'search_enabled',
			'moreless_enabled',
			'dropdown_enabled',
			'dropdown_n_selected_enabled',
			'dropdown_apply_button',
			'scroll_enabled',
		] as $toggle_key ) {
			if ( array_key_exists( $toggle_key, $prepared_attrs ) ) {
				$prepared_attrs[ $toggle_key ] = self::normalize_toggle_value( $prepared_attrs[ $toggle_key ] );
			}
		}

		return $prepared_attrs;
	}

	/**
	 * Module's style components.
	 *
	 * This function is equivalent of JS function ModuleStyles located in
	 * module/styles.tsx.
	 *
	 * @param array $args {
	 *     An array of arguments.
	 *
	 *      @type string $id                Module ID. In VB, the ID of module is UUIDV4. In FE, the ID is order index.
	 *      @type string $name              Module name.
	 *      @type string $attrs             Module attributes.
	 *      @type string $parentAttrs       Parent attrs.
	 *      @type string $orderClass        Selector class name.
	 *      @type string $parentOrderClass  Parent selector class name.
	 *      @type string $wrapperOrderClass Wrapper selector class name.
	 *      @type string $settings          Custom settings.
	 *      @type string $state             Attributes state.
	 *      @type string $mode              Style mode.
	 *      @type ModuleElements $elements  ModuleElements instance.
	 * }
	 */
	public static function module_styles( $args ) {

		$elements                    = $args['elements'];
		$settings                    = $args['settings'] ?? [];
		$default_printed_style_attrs = $args['defaultPrintedStyleAttrs'] ?? [];
		$attrs                       = $args['attrs'] ?? [];
		$order_class                 = $args['orderClass'] ?? '';

		$item_typography = Utils\extract_typography_attrs( $attrs['module']['decoration']['itemTypography'] ?? null );
		$item_border = Utils\extract_border_attrs( $attrs['module']['decoration']['itemBorder'] ?? null );
		$item_spacing = Utils\extract_spasing_attrs( $attrs['module']['decoration']['itemSpacing'] ?? null );
		$radio_border = Utils\extract_border_attrs( $attrs['module']['decoration']['radioBorder'] ?? null );
		$label_typography = Utils\extract_typography_attrs( $attrs['module']['decoration']['labelTypography'] ?? null );
		$apply_typography = Utils\extract_typography_attrs( $attrs['module']['decoration']['applyTypography'] ?? null );
		$apply_border = Utils\extract_border_attrs( $attrs['module']['decoration']['applyBorder'] ?? null );
		$apply_spacing = Utils\extract_spasing_attrs( $attrs['module']['decoration']['applySpacing'] ?? null );
		$search_items_typography = Utils\extract_typography_attrs( $attrs['module']['decoration']['searchItemsTypography'] ?? null );
		$search_input_border = Utils\extract_border_attrs( $attrs['module']['decoration']['searchInputBorder'] ?? null );
		$search_input_padding = Utils\extract_spasing_attrs( $attrs['module']['decoration']['searchInputPadding'] ?? null );
		$search_input_margin = Utils\extract_spasing_attrs( $attrs['module']['decoration']['searchInputMargin'] ?? null );
		$more_less_button_typography = Utils\extract_typography_attrs( $attrs['module']['decoration']['moreLessButtonTypography'] ?? null );
		$more_less_button_border = Utils\extract_border_attrs( $attrs['module']['decoration']['moreLessButtonBorder'] ?? null );
		$more_less_button_padding = Utils\extract_spasing_attrs( $attrs['module']['decoration']['moreLessButtonPadding'] ?? null );
		$more_less_border = Utils\extract_border_attrs( $attrs['module']['decoration']['moreLessBorder'] ?? null );
		$more_less_padding = Utils\extract_spasing_attrs( $attrs['module']['decoration']['moreLessPadding'] ?? null );
		$dropdown_label_typography = Utils\extract_typography_attrs( $attrs['module']['decoration']['dropdownLabelTypography'] ?? null );
		$dropdown_label_border = Utils\extract_border_attrs( $attrs['module']['decoration']['dropdownLabelBorder'] ?? null );
		$dropdown_label_padding = Utils\extract_spasing_attrs( $attrs['module']['decoration']['dropdownLabelPadding'] ?? null );
		$dropdown_active_item_typography = Utils\extract_typography_attrs( $attrs['module']['decoration']['dropdownActiveItemTypography'] ?? null );
		$dropdown_active_item_border = Utils\extract_border_attrs( $attrs['module']['decoration']['dropdownActiveItemBorder'] ?? null );
		$dropdown_active_item_padding = Utils\extract_spasing_attrs( $attrs['module']['decoration']['dropdownActiveItemPadding'] ?? null );
		$dropdown_n_selected_typography = Utils\extract_typography_attrs( $attrs['module']['decoration']['dropdownNSelectedTypography'] ?? null );
		$dropdown_n_selected_margin = Utils\extract_spasing_attrs( $attrs['module']['decoration']['dropdownNSelectedMargin'] ?? null );
		$dropdown_body_border = Utils\extract_border_attrs( $attrs['module']['decoration']['dropdownBodyBorder'] ?? null );
		$dropdown_body_items_padding = Utils\extract_spasing_attrs( $attrs['module']['decoration']['dropdownBodyItemsPadding'] ?? null );
		$dropdown_footer_border = Utils\extract_border_attrs( $attrs['module']['decoration']['dropdownFooterBorder'] ?? null );
		$dropdown_footer_margin = Utils\extract_spasing_attrs( $attrs['module']['decoration']['dropdownFooterMargin'] ?? null );
		$dropdown_footer_padding = Utils\extract_spasing_attrs( $attrs['module']['decoration']['dropdownFooterPadding'] ?? null );
		$item_border_styles = Utils\build_border_styles( "{$order_class} .jet-checkboxes-list .jet-checkboxes-list__item .jet-checkboxes-list__button", $item_border );
		$radio_border_styles = Utils\build_border_styles( "{$order_class} .jet-checkboxes-list .jet-checkboxes-list__item .jet-checkboxes-list__decorator", $radio_border );
		$apply_border_styles = Utils\build_border_styles( "{$order_class} .apply-filters__button", $apply_border );
		$search_input_border_styles = Utils\build_border_styles( "{$order_class} .jet-filter-items-search__input", $search_input_border );
		$more_less_button_border_styles = Utils\build_border_styles( "{$order_class} .jet-filter-items-moreless__toggle", $more_less_button_border );
		$more_less_border_styles = Utils\build_border_styles( "{$order_class} .jet-filter-items-moreless", $more_less_border );
		$dropdown_label_border_styles = Utils\build_border_styles( "{$order_class} .jet-filter-items-dropdown__label", $dropdown_label_border );
		$dropdown_active_item_border_styles = Utils\build_border_styles( "{$order_class} .jet-filter-items-dropdown__active__item", $dropdown_active_item_border );
		$dropdown_body_border_styles = Utils\build_border_styles( "{$order_class} .jet-filter-items-dropdown__body", $dropdown_body_border );
		$dropdown_footer_border_styles = Utils\build_border_styles( "{$order_class} .jet-filter-items-dropdown__footer", $dropdown_footer_border );

		Style::add(
			[
				'id'            => $args['id'],
				'name'          => $args['name'],
				'orderIndex'    => $args['orderIndex'],
				'storeInstance' => $args['storeInstance'],
				'styles'        => [
					$elements->style(
						[
							'attrName'   => 'module',
							'styleProps' => [
								'defaultPrintedStyleAttrs' => $default_printed_style_attrs['module']['decoration'] ?? [],
								'disabledOn'               => [
									'disabledModuleVisibility' => $settings['disabledModuleVisibility'] ?? null,
								],
								'advancedStyles' => [
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$args['orderClass']} .jet-checkboxes-list__row, {$args['orderClass']} .jet-list-tree__children",
											'attr'     => $attrs['module']['decoration']['filtersPosition'] ?? [],
											'property' => 'display',
										]
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$args['orderClass']} .jet-checkboxes-list__row:not(:last-child), {$args['orderClass']} .jet-list-tree__children:not(:last-child)",
											'attr'     => $attrs['module']['decoration']['gapY'] ?? [],
											'property' => 'margin-bottom',
										]
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$args['orderClass']} .jet-checkboxes-list__decorator",
											'attr'     => $attrs['module']['decoration']['showDecorator'] ?? [],
											'property' => 'display',
										]
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'font-family',
											'selector' => "{$order_class} .jet-checkboxes-list__label",
											'attr'     => $item_typography['fontFamily'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'font-size',
											'selector' => "{$order_class} .jet-checkboxes-list__label",
											'attr'     => $item_typography['fontSize'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'line-height',
											'selector' => "{$order_class} .jet-checkboxes-list__label",
											'attr'     => $item_typography['lineHeight'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'letter-spacing',
											'selector' => "{$order_class} .jet-checkboxes-list__label",
											'attr'     => $item_typography['letterSpacing'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'font-weight',
											'selector' => "{$order_class} .jet-checkboxes-list__label",
											'attr'     => $item_typography['fontWeight'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'font-style',
											'selector' => "{$order_class} .jet-checkboxes-list__label",
											'attr'     => $item_typography['fontStyle'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'text-transform',
											'selector' => "{$order_class} .jet-checkboxes-list__label",
											'attr'     => $item_typography['textTransform'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'text-decoration',
											'selector' => "{$order_class} .jet-checkboxes-list__label",
											'attr'     => $item_typography['textDecoration'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'text-align',
											'selector' => "{$order_class} .jet-checkboxes-list__label",
											'attr'     => $item_typography['textAlign'] ?? [],
										],
									],

									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$args['orderClass']} .jet-checkboxes-list__button",
											'attr'     => $attrs['module']['decoration']['itemNormalColor'] ?? [],
											'property' => 'color',
										]
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$args['orderClass']} .jet-checkboxes-list__button",
											'attr'     => $attrs['module']['decoration']['itemNormalBgColor'] ?? [],
											'property' => 'background-color',
										]
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$args['orderClass']} .jet-checkboxes-list__button:hover",
											'attr'     => $attrs['module']['decoration']['itemHoverColor'] ?? [],
											'property' => 'color',
										]
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$args['orderClass']} .jet-checkboxes-list__button:hover",
											'attr'     => $attrs['module']['decoration']['itemHoverBgColor'] ?? [],
											'property' => 'background-color',
										]
									],

									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$args['orderClass']} .jet-checkboxes-list__input:checked ~ .jet-checkboxes-list__button",
											'attr'     => $attrs['module']['decoration']['itemCheckedColor'] ?? [],
											'property' => 'color',
										]
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$args['orderClass']} .jet-checkboxes-list__input:checked ~ .jet-checkboxes-list__button",
											'attr'     => $attrs['module']['decoration']['itemCheckedBgColor'] ?? [],
											'property' => 'background-color',
										]
									],

									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-checkboxes-list .jet-checkboxes-list__item .jet-checkboxes-list__button",
											'property' => 'border-style',
											'attr'     => $item_border['style'],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-checkboxes-list .jet-checkboxes-list__item .jet-checkboxes-list__button",
											'property' => 'border-width',
											'attr'     => $item_border['width'],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-checkboxes-list .jet-checkboxes-list__item .jet-checkboxes-list__button",
											'property' => 'border-color',
											'attr'     => $item_border['color'],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-checkboxes-list .jet-checkboxes-list__item .jet-checkboxes-list__button",
											'property' => 'border-radius',
											'attr'     => $item_border['radius'],
										],
									],
									[
										'componentName' => 'divi/common',
										'props' => [
											'property' => 'margin',
											'selector' => "{$order_class} .jet-checkboxes-list__button",
											'attr'     => $item_spacing['margin'],
										]
									],
									[
										'componentName' => 'divi/common',
										'props' => [
											'property' => 'padding',
											'selector' => "{$order_class} .jet-checkboxes-list__button",
											'attr'     => $item_spacing['padding'],
										]
									],

									[
										'componentName' => 'divi/common',
										'props' => [
											'property' => 'width',
											'selector' => "{$order_class} .jet-checkboxes-list .jet-checkboxes-list__item .jet-checkboxes-list__decorator",
											'attr'     => $attrs['module']['decoration']['radioSize'] ?? [],
										]
									],
									[
										'componentName' => 'divi/common',
										'props' => [
											'property' => 'height',
											'selector' => "{$order_class} .jet-checkboxes-list .jet-checkboxes-list__item .jet-checkboxes-list__decorator",
											'attr'     => $attrs['module']['decoration']['radioSize'] ?? [],
										]
									],
									[
										'componentName' => 'divi/common',
										'props' => [
											'property' => 'margin-top',
											'selector' => "{$order_class} .jet-checkboxes-list .jet-checkboxes-list__item .jet-checkboxes-list__decorator",
											'attr'     => $attrs['module']['decoration']['radioTopOffset'] ?? [],
										]
									],
									[
										'componentName' => 'divi/common',
										'props' => [
											'property' => 'margin-right',
											'selector' => "{$order_class} .jet-checkboxes-list .jet-checkboxes-list__item .jet-checkboxes-list__decorator",
											'attr'     => $attrs['module']['decoration']['radioLabelOffset'] ?? [],
										]
									],
									[
										'componentName' => 'divi/common',
										'props' => [
											'property' => 'font-size',
											'selector' => "{$order_class} .jet-checkboxes-list .jet-checkboxes-list__item .jet-checkboxes-list__checked-icon",
											'attr'     => $attrs['module']['decoration']['checkedIconSize'] ?? [],
										]
									],
									[
										'componentName' => 'divi/common',
										'props' => [
											'property' => 'color',
											'selector' => "{$order_class} .jet-checkboxes-list .jet-checkboxes-list__item .jet-checkboxes-list__checked-icon",
											'attr'     => $attrs['module']['decoration']['checkedIconColor'] ?? [],
										]
									],
									[
										'componentName' => 'divi/common',
										'props' => [
											'selector' => "{$order_class} .jet-checkboxes-list .jet-checkboxes-list__item .jet-checkboxes-list__decorator",
											'attr'     => $attrs['module']['decoration']['radioNormalBackgroundColor'] ?? [],
											'property' => 'background-color',
										]
									],
									[
										'componentName' => 'divi/common',
										'props' => [
											'selector' => "{$order_class} .jet-checkboxes-list .jet-checkboxes-list__item .jet-checkboxes-list__input:checked+.jet-checkboxes-list__button .jet-checkboxes-list__decorator",
											'attr'     => $attrs['module']['decoration']['radioCheckedBackgroundColor'] ?? [],
											'property' => 'background-color',
										]
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-checkboxes-list .jet-checkboxes-list__item .jet-checkboxes-list__decorator",
											'property' => 'border-style',
											'attr'     => $radio_border['style'],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-checkboxes-list .jet-checkboxes-list__item .jet-checkboxes-list__decorator",
											'property' => 'border-width',
											'attr'     => $radio_border['width'],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-checkboxes-list .jet-checkboxes-list__item .jet-checkboxes-list__decorator",
											'property' => 'border-color',
											'attr'     => $radio_border['color'],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-checkboxes-list .jet-checkboxes-list__item .jet-checkboxes-list__decorator",
											'property' => 'border-radius',
											'attr'     => $radio_border['radius'],
										],
									],

									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'font-family',
											'selector' => "{$order_class} .jet-filter-label",
											'attr'     => $label_typography['fontFamily'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'font-size',
											'selector' => "{$order_class} .jet-filter-label",
											'attr'     => $label_typography['fontSize'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'line-height',
											'selector' => "{$order_class} .jet-filter-label",
											'attr'     => $label_typography['lineHeight'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'letter-spacing',
											'selector' => "{$order_class} .jet-filter-label",
											'attr'     => $label_typography['letterSpacing'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'font-weight',
											'selector' => "{$order_class} .jet-filter-label",
											'attr'     => $label_typography['fontWeight'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'font-style',
											'selector' => "{$order_class} .jet-filter-label",
											'attr'     => $label_typography['fontStyle'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'text-transform',
											'selector' => "{$order_class} .jet-filter-label",
											'attr'     => $label_typography['textTransform'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'text-decoration',
											'selector' => "{$order_class} .jet-filter-label",
											'attr'     => $label_typography['textDecoration'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'text-align',
											'selector' => "{$order_class} .jet-filter-label",
											'attr'     => $label_typography['textAlign'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-label",
											'property' => 'text-align',
											'attr'     => $attrs['module']['decoration']['labelAlignment'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'color',
											'selector' => "{$order_class} .jet-filter-label",
											'attr'     => $attrs['module']['decoration']['labelColor'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'margin-bottom',
											'selector' => "{$order_class} .jet-filter-label",
											'attr'     => $attrs['module']['decoration']['labelGapY'] ?? [],
										],
									],

									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'font-family',
											'selector' => "{$order_class} .jet-checkboxes-list__label",
											'attr'     => $item_typography['fontFamily'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'font-size',
											'selector' => "{$order_class} .jet-checkboxes-list__label",
											'attr'     => $item_typography['fontSize'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'line-height',
											'selector' => "{$order_class} .jet-checkboxes-list__label",
											'attr'     => $item_typography['lineHeight'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'letter-spacing',
											'selector' => "{$order_class} .jet-checkboxes-list__label",
											'attr'     => $item_typography['letterSpacing'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'font-weight',
											'selector' => "{$order_class} .jet-checkboxes-list__label",
											'attr'     => $item_typography['fontWeight'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'font-style',
											'selector' => "{$order_class} .jet-checkboxes-list__label",
											'attr'     => $item_typography['fontStyle'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'text-transform',
											'selector' => "{$order_class} .jet-checkboxes-list__label",
											'attr'     => $item_typography['textTransform'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'text-decoration',
											'selector' => "{$order_class} .jet-checkboxes-list__label",
											'attr'     => $item_typography['textDecoration'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'text-align',
											'selector' => "{$order_class} .jet-checkboxes-list__label",
											'attr'     => $item_typography['textAlign'] ?? [],
										],
									],

									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$args['orderClass']} .jet-checkboxes-list__button",
											'attr'     => $attrs['module']['decoration']['itemNormalColor'] ?? [],
											'property' => 'color',
										]
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$args['orderClass']} .jet-checkboxes-list__button",
											'attr'     => $attrs['module']['decoration']['itemNormalBgColor'] ?? [],
											'property' => 'background-color',
										]
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$args['orderClass']} .jet-checkboxes-list__button:hover",
											'attr'     => $attrs['module']['decoration']['itemHoverColor'] ?? [],
											'property' => 'color',
										]
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$args['orderClass']} .jet-checkboxes-list__button:hover",
											'attr'     => $attrs['module']['decoration']['itemHoverBgColor'] ?? [],
											'property' => 'background-color',
										]
									],

									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$args['orderClass']} .jet-checkboxes-list__input:checked ~ .jet-checkboxes-list__button",
											'attr'     => $attrs['module']['decoration']['itemCheckedColor'] ?? [],
											'property' => 'color',
										]
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$args['orderClass']} .jet-checkboxes-list__input:checked ~ .jet-checkboxes-list__button",
											'attr'     => $attrs['module']['decoration']['itemCheckedBgColor'] ?? [],
											'property' => 'background-color',
										]
									],

									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-checkboxes-list .jet-checkboxes-list__item .jet-checkboxes-list__button",
											'property' => 'border-style',
											'attr'     => $item_border['style'],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-checkboxes-list .jet-checkboxes-list__item .jet-checkboxes-list__button",
											'property' => 'border-width',
											'attr'     => $item_border['width'],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-checkboxes-list .jet-checkboxes-list__item .jet-checkboxes-list__button",
											'property' => 'border-color',
											'attr'     => $item_border['color'],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-checkboxes-list .jet-checkboxes-list__item .jet-checkboxes-list__button",
											'property' => 'border-radius',
											'attr'     => $item_border['radius'],
										],
									],
									[
										'componentName' => 'divi/common',
										'props' => [
											'property' => 'margin',
											'selector' => "{$order_class} .jet-checkboxes-list__button",
											'attr'     => $item_spacing['margin'],
										]
									],
									[
										'componentName' => 'divi/common',
										'props' => [
											'property' => 'padding',
											'selector' => "{$order_class} .jet-checkboxes-list__button",
											'attr'     => $item_spacing['padding'],
										]
									],





									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'font-family',
											'selector' => "{$order_class} .apply-filters__button",
											'attr'     => $apply_typography['fontFamily'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'font-size',
											'selector' => "{$order_class} .apply-filters__button",
											'attr'     => $apply_typography['fontSize'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'line-height',
											'selector' => "{$order_class} .apply-filters__button",
											'attr'     => $apply_typography['lineHeight'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'letter-spacing',
											'selector' => "{$order_class} .apply-filters__button",
											'attr'     => $apply_typography['letterSpacing'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'font-weight',
											'selector' => "{$order_class} .apply-filters__button",
											'attr'     => $apply_typography['fontWeight'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'font-style',
											'selector' => "{$order_class} .apply-filters__button",
											'attr'     => $apply_typography['fontStyle'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'text-transform',
											'selector' => "{$order_class} .apply-filters__button",
											'attr'     => $apply_typography['textTransform'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'text-decoration',
											'selector' => "{$order_class} .apply-filters__button",
											'attr'     => $apply_typography['textDecoration'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'property' => 'text-align',
											'selector' => "{$order_class} .apply-filters__button",
											'attr'     => $apply_typography['textAlign'] ?? [],
										],
									],

									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .apply-filters__button",
											'property' => 'align-self',
											'attr'     => $attrs['module']['decoration']['applyAlignment'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$args['orderClass']} .apply-filters__button",
											'attr'     => $attrs['module']['decoration']['applyNormalColor'] ?? [],
											'property' => 'color',
										]
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$args['orderClass']} .apply-filters__button",
											'attr'     => $attrs['module']['decoration']['applyNormalBgColor'] ?? [],
											'property' => 'background-color',
										]
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$args['orderClass']} .apply-filters__button:hover",
											'attr'     => $attrs['module']['decoration']['applyHoverColor'] ?? [],
											'property' => 'color',
										]
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$args['orderClass']} .apply-filters__button:hover",
											'attr'     => $attrs['module']['decoration']['applyHoverBgColor'] ?? [],
											'property' => 'background-color',
										]
									],

									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .apply-filters__button",
											'property' => 'border-style',
											'attr'     => $apply_border['style'],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .apply-filters__button",
											'property' => 'border-width',
											'attr'     => $apply_border['width'],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .apply-filters__button",
											'property' => 'border-color',
											'attr'     => $apply_border['color'],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .apply-filters__button",
											'property' => 'border-radius',
											'attr'     => $apply_border['radius'],
										],
									],
									[
										'componentName' => 'divi/common',
										'props' => [
											'property' => 'margin',
											'selector' => "{$order_class} .apply-filters__button",
											'attr'     => $apply_spacing['margin'],
										]
									],
									[
										'componentName' => 'divi/common',
										'props' => [
											'property' => 'padding',
											'selector' => "{$order_class} .apply-filters__button",
											'attr'     => $apply_spacing['padding'],
										]
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-search",
											'property' => 'max-width',
											'attr'     => $attrs['module']['decoration']['searchItemsWidth'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-search__input",
											'property' => 'font-family',
											'attr'     => $search_items_typography['fontFamily'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-search__input",
											'property' => 'font-size',
											'attr'     => $search_items_typography['fontSize'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-search__input",
											'property' => 'line-height',
											'attr'     => $search_items_typography['lineHeight'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-search__input",
											'property' => 'letter-spacing',
											'attr'     => $search_items_typography['letterSpacing'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-search__input",
											'property' => 'font-weight',
											'attr'     => $search_items_typography['fontWeight'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-search__input",
											'property' => 'font-style',
											'attr'     => $search_items_typography['fontStyle'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-search__input",
											'property' => 'text-transform',
											'attr'     => $search_items_typography['textTransform'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-search__input",
											'property' => 'text-decoration',
											'attr'     => $search_items_typography['textDecoration'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-search__input",
											'property' => 'color',
											'attr'     => $attrs['module']['decoration']['searchItemsColor'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-search__input",
											'property' => 'background-color',
											'attr'     => $attrs['module']['decoration']['searchItemsBackgroundColor'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-search__input",
											'property' => 'border-style',
											'attr'     => $search_input_border['style'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-search__input",
											'property' => 'border-width',
											'attr'     => $search_input_border['width'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-search__input",
											'property' => 'border-color',
											'attr'     => $search_input_border['color'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-search__input",
											'property' => 'border-radius',
											'attr'     => $search_input_border['radius'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-search__input",
											'property' => 'padding',
											'attr'     => $search_input_padding['padding'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-search",
											'property' => 'margin',
											'attr'     => $search_input_margin['margin'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-search__clear",
											'property' => 'color',
											'attr'     => $attrs['module']['decoration']['searchRemoveNormalColor'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-search__clear:hover",
											'property' => 'color',
											'attr'     => $attrs['module']['decoration']['searchRemoveHoverColor'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-search__clear",
											'property' => 'font-size',
											'attr'     => $attrs['module']['decoration']['searchRemoveSize'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-search__clear",
											'property' => 'right',
											'attr'     => $attrs['module']['decoration']['searchRemoveRightOffset'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-moreless__toggle",
											'property' => 'font-family',
											'attr'     => $more_less_button_typography['fontFamily'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-moreless__toggle",
											'property' => 'font-size',
											'attr'     => $more_less_button_typography['fontSize'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-moreless__toggle",
											'property' => 'line-height',
											'attr'     => $more_less_button_typography['lineHeight'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-moreless__toggle",
											'property' => 'letter-spacing',
											'attr'     => $more_less_button_typography['letterSpacing'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-moreless__toggle",
											'property' => 'font-weight',
											'attr'     => $more_less_button_typography['fontWeight'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-moreless__toggle",
											'property' => 'font-style',
											'attr'     => $more_less_button_typography['fontStyle'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-moreless__toggle",
											'property' => 'text-transform',
											'attr'     => $more_less_button_typography['textTransform'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-moreless__toggle",
											'property' => 'text-decoration',
											'attr'     => $more_less_button_typography['textDecoration'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-moreless__toggle",
											'property' => 'color',
											'attr'     => $attrs['module']['decoration']['moreLessButtonNormalColor'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-moreless__toggle",
											'property' => 'background-color',
											'attr'     => $attrs['module']['decoration']['moreLessButtonNormalBackgroundColor'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-moreless__toggle:hover",
											'property' => 'color',
											'attr'     => $attrs['module']['decoration']['moreLessButtonHoverColor'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-moreless__toggle:hover",
											'property' => 'background-color',
											'attr'     => $attrs['module']['decoration']['moreLessButtonHoverBackgroundColor'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-moreless__toggle:hover",
											'property' => 'border-color',
											'attr'     => $attrs['module']['decoration']['moreLessButtonHoverBorderColor'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-moreless__toggle",
											'property' => 'border-style',
											'attr'     => $more_less_button_border['style'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-moreless__toggle",
											'property' => 'border-width',
											'attr'     => $more_less_button_border['width'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-moreless__toggle",
											'property' => 'border-color',
											'attr'     => $more_less_button_border['color'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-moreless__toggle",
											'property' => 'border-radius',
											'attr'     => $more_less_button_border['radius'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-moreless__toggle",
											'property' => 'padding',
											'attr'     => $more_less_button_padding['padding'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-moreless",
											'property' => 'background-color',
											'attr'     => $attrs['module']['decoration']['moreLessBackgroundColor'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-moreless",
											'property' => 'border-style',
											'attr'     => $more_less_border['style'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-moreless",
											'property' => 'border-width',
											'attr'     => $more_less_border['width'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-moreless",
											'property' => 'border-color',
											'attr'     => $more_less_border['color'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-moreless",
											'property' => 'border-radius',
											'attr'     => $more_less_border['radius'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-moreless",
											'property' => 'padding',
											'attr'     => $more_less_padding['padding'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-moreless",
											'property' => 'text-align',
											'attr'     => $attrs['module']['decoration']['moreLessButtonAlignment'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown",
											'property' => 'max-width',
											'attr'     => $attrs['module']['decoration']['dropdownWidth'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__label",
											'property' => 'font-family',
											'attr'     => $dropdown_label_typography['fontFamily'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__label",
											'property' => 'font-size',
											'attr'     => $dropdown_label_typography['fontSize'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__label",
											'property' => 'line-height',
											'attr'     => $dropdown_label_typography['lineHeight'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__label",
											'property' => 'letter-spacing',
											'attr'     => $dropdown_label_typography['letterSpacing'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__label",
											'property' => 'font-weight',
											'attr'     => $dropdown_label_typography['fontWeight'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__label",
											'property' => 'font-style',
											'attr'     => $dropdown_label_typography['fontStyle'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__label",
											'property' => 'text-transform',
											'attr'     => $dropdown_label_typography['textTransform'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__label",
											'property' => 'text-decoration',
											'attr'     => $dropdown_label_typography['textDecoration'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__label",
											'property' => 'color',
											'attr'     => $attrs['module']['decoration']['dropdownLabelColor'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__label",
											'property' => 'background-color',
											'attr'     => $attrs['module']['decoration']['dropdownLabelBackgroundColor'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__label",
											'property' => 'border-style',
											'attr'     => $dropdown_label_border['style'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__label",
											'property' => 'border-width',
											'attr'     => $dropdown_label_border['width'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__label",
											'property' => 'border-color',
											'attr'     => $dropdown_label_border['color'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__label",
											'property' => 'border-radius',
											'attr'     => $dropdown_label_border['radius'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__label",
											'property' => 'padding',
											'attr'     => $dropdown_label_padding['padding'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__active",
											'property' => 'margin',
											'attr'     => $attrs['module']['decoration']['dropdownActiveItemsOffset'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__active__item",
											'property' => 'margin',
											'attr'     => $attrs['module']['decoration']['dropdownActiveItemsOffset'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__active__item",
											'property' => 'font-family',
											'attr'     => $dropdown_active_item_typography['fontFamily'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__active__item",
											'property' => 'font-size',
											'attr'     => $dropdown_active_item_typography['fontSize'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__active__item",
											'property' => 'line-height',
											'attr'     => $dropdown_active_item_typography['lineHeight'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__active__item",
											'property' => 'letter-spacing',
											'attr'     => $dropdown_active_item_typography['letterSpacing'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__active__item",
											'property' => 'font-weight',
											'attr'     => $dropdown_active_item_typography['fontWeight'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__active__item",
											'property' => 'font-style',
											'attr'     => $dropdown_active_item_typography['fontStyle'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__active__item",
											'property' => 'text-transform',
											'attr'     => $dropdown_active_item_typography['textTransform'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__active__item",
											'property' => 'text-decoration',
											'attr'     => $dropdown_active_item_typography['textDecoration'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__active__item",
											'property' => 'color',
											'attr'     => $attrs['module']['decoration']['dropdownActiveItemNormalColor'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__active__item",
											'property' => 'background-color',
											'attr'     => $attrs['module']['decoration']['dropdownActiveItemNormalBackgroundColor'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__active__item:hover",
											'property' => 'color',
											'attr'     => $attrs['module']['decoration']['dropdownActiveItemHoverColor'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__active__item:hover",
											'property' => 'background-color',
											'attr'     => $attrs['module']['decoration']['dropdownActiveItemHoverBackgroundColor'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__active__item:hover",
											'property' => 'border-color',
											'attr'     => $attrs['module']['decoration']['dropdownActiveItemHoverBorderColor'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__active__item",
											'property' => 'border-style',
											'attr'     => $dropdown_active_item_border['style'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__active__item",
											'property' => 'border-width',
											'attr'     => $dropdown_active_item_border['width'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__active__item",
											'property' => 'border-color',
											'attr'     => $dropdown_active_item_border['color'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__active__item",
											'property' => 'border-radius',
											'attr'     => $dropdown_active_item_border['radius'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__active__item",
											'property' => 'padding',
											'attr'     => $dropdown_active_item_padding['padding'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__n-selected",
											'property' => 'font-family',
											'attr'     => $dropdown_n_selected_typography['fontFamily'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__n-selected",
											'property' => 'font-size',
											'attr'     => $dropdown_n_selected_typography['fontSize'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__n-selected",
											'property' => 'line-height',
											'attr'     => $dropdown_n_selected_typography['lineHeight'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__n-selected",
											'property' => 'letter-spacing',
											'attr'     => $dropdown_n_selected_typography['letterSpacing'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__n-selected",
											'property' => 'font-weight',
											'attr'     => $dropdown_n_selected_typography['fontWeight'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__n-selected",
											'property' => 'font-style',
											'attr'     => $dropdown_n_selected_typography['fontStyle'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__n-selected",
											'property' => 'text-transform',
											'attr'     => $dropdown_n_selected_typography['textTransform'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__n-selected",
											'property' => 'text-decoration',
											'attr'     => $dropdown_n_selected_typography['textDecoration'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__n-selected",
											'property' => 'color',
											'attr'     => $attrs['module']['decoration']['dropdownNSelectedColor'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__n-selected",
											'property' => 'margin',
											'attr'     => $dropdown_n_selected_margin['margin'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__body",
											'property' => 'margin-top',
											'attr'     => $attrs['module']['decoration']['dropdownBodyOffset'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__body",
											'property' => 'border-style',
											'attr'     => $dropdown_body_border['style'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__body",
											'property' => 'border-width',
											'attr'     => $dropdown_body_border['width'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__body",
											'property' => 'border-color',
											'attr'     => $dropdown_body_border['color'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__body",
											'property' => 'border-radius',
											'attr'     => $dropdown_body_border['radius'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__body",
											'property' => 'background-color',
											'attr'     => $attrs['module']['decoration']['dropdownBodyBackgroundColor'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-checkboxes-list-wrapper",
											'property' => 'padding',
											'attr'     => $dropdown_body_items_padding['padding'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__footer",
											'property' => 'background-color',
											'attr'     => $attrs['module']['decoration']['dropdownFooterBackgroundColor'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__footer",
											'property' => 'border-style',
											'attr'     => $dropdown_footer_border['style'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__footer",
											'property' => 'border-width',
											'attr'     => $dropdown_footer_border['width'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__footer",
											'property' => 'border-color',
											'attr'     => $dropdown_footer_border['color'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__footer",
											'property' => 'border-radius',
											'attr'     => $dropdown_footer_border['radius'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__footer",
											'property' => 'margin',
											'attr'     => $dropdown_footer_margin['margin'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__footer",
											'property' => 'padding',
											'attr'     => $dropdown_footer_padding['padding'] ?? [],
										],
									],
									[
										'componentName' => 'divi/common',
										'props'         => [
											'selector' => "{$order_class} .jet-filter-items-dropdown__footer",
											'property' => 'justify-content',
											'attr'     => $attrs['module']['decoration']['dropdownFooterAlignment'] ?? [],
										],
									],
									...$item_border_styles,
									...$radio_border_styles,
									...$apply_border_styles,
									...$search_input_border_styles,
									...$more_less_button_border_styles,
									...$more_less_border_styles,
									...$dropdown_label_border_styles,
									...$dropdown_active_item_border_styles,
									...$dropdown_body_border_styles,
									...$dropdown_footer_border_styles,

								],
							],
						]
					)
				],
			]
		);
	}

	/**
	 * Set script data of used module options.
	 *
	 * @since ??
	 *
	 * @param array $args {
	 *   Array of arguments.
	 *
	 *   @type string $id       Module id.
	 *   @type string $selector Module selector.
	 *   @type array  $attrs    Module attributes.
	 * }
	 */
	public static function module_script_data( $args ) {
	}

	/**
	 * Module classnames function for Dynamic module.
	 *
	 * This function is equivalent of JS function moduleClassnames located in
	 * src/components/dynamic-module/module-classnames.ts.
	 *
	 * @since ??
	 *
	 * @param array $args {
	 *     An array of arguments.
	 *
	 *     @type object $classnamesInstance Instance of ET\Builder\Packages\Module\Layout\Components\Classnames.
	 *     @type array  $attrs              Block attributes data that being rendered.
	 * }
	 */
	public static function module_classnames( $args ) {
	}

	/**
	 * Dynamic module render callback which outputs server side rendered HTML on the Front-End.
	 *
	 * @since ??
	 *
	 * @param array          $attrs    Block attributes that were saved by VB.
	 * @param string         $content  Block content.
	 * @param \WP_Block      $block    Parsed block object that being rendered.
	 * @param ModuleElements $elements ModuleElements instance.
	 *
	 * @return string HTML rendered of module.
	 */
	public static function render_callback( $attrs, $content, $block, $elements ) {

		$prepared_attrs = self::get_prepared_attrs( $attrs );

		$parent       = BlockParserStore::get_parent( $block->parsed_block['id'], $block->parsed_block['storeInstance'] );
		$parent_attrs = $parent->attrs ?? [];

		$filters_block_type = jet_smart_filters()->blocks->get_block_type( 'checkboxes' );
		$content = $filters_block_type->render_callback( $prepared_attrs );

		return Module::render(
			[
				// FE only.
				'orderIndex'          => $block->parsed_block['orderIndex'],
				'storeInstance'       => $block->parsed_block['storeInstance'],

				// VB equivalent.
				'id'                  => $block->parsed_block['id'],
				'name'                => $block->block_type->name,
				'moduleCategory'      => $block->block_type->category,
				'attrs'               => $attrs,
				'elements'            => $elements,
				'classnamesFunction'  => [ Checkboxes_Filter::class, 'module_classnames' ],
				'stylesComponent'     => [ Checkboxes_Filter::class, 'module_styles' ],
				'scriptDataComponent' => [ Checkboxes_Filter::class, 'module_script_data' ],
				'parentAttrs'         => $parent_attrs,
				'parentId'            => $parent->id ?? '',
				'parentName'          => $parent->blockName ?? '',
				'children'            => [ $content ],
			]
		);
	}

	/**
	 * Get JetEngine render class instance
	 */
	public static function get_jet_engine_render_instance( $attributes ) {
		return jet_engine()->listings->get_render_instance( self::get_jet_engine_render_name(), $attributes );
	}

	/**
	 * Return name of JetEngine renderer for current module
	 */
	public static function get_jet_engine_render_name() {
		return 'dynamic-field';
	}

	/**
	 * Loads `DynamicField` and registers Front-End render callback and REST API Endpoints.
	 *
	 * @since ??
	 *
	 * @return void
	 */
	public function load() {

		$module_json_folder_path = JET_ENGINE_DIVI_VIEWS_MODULES_JSON_PATH . 'checkboxes-filter/';

		add_action(
			'init',
			function() use ( $module_json_folder_path ) {
				ModuleRegistration::register_module(
					$module_json_folder_path,
					[
						'render_callback' => [ Checkboxes_Filter::class, 'render_callback' ],
					]
				);
			}
		);
	}
}
