';
$result = [
'id' => uniqid(),
'type' => self::$type,
'name' => __( 'Billing Shipping Address', 'yaymail' ),
'icon' => self::$icon,
'group' => 'woocommerce',
'available' => true,
'position' => 180,
'data' => [
'container_group_definition' => [
'component' => 'GroupDefinition',
'title' => __( 'Container settings', 'yaymail' ),
'description' => __( 'Handle container layout settings', 'yaymail' ),
],
'padding' => ElementsHelper::get_spacing( $attributes ),
'background_color' => ElementsHelper::get_color(
$attributes,
[
'default_value' => '#fff',
]
),
'content_breaker' => [
'component' => 'LineBreaker',
],
'content_group_definition' => [
'component' => 'GroupDefinition',
'title' => __( 'Content settings', 'yaymail' ),
'description' => __( 'Handle content settings', 'yaymail' ),
],
'layout_type' => [
'value_path' => 'layout_type',
'component' => 'Selector',
'title' => __( 'Layout type', 'yaymail' ),
'default_value' => isset( $attributes['layout_type'] ) ? $attributes['layout_type'] : $layout_type,
'options' => [
[
'label' => __( 'Legacy', 'yaymail' ),
'value' => 'legacy',
],
[
'label' => __( 'Modern', 'yaymail' ),
'value' => 'modern',
],
],
'type' => 'content',
],
'responsive_on_mobile' => [
'value_path' => 'responsive_on_mobile',
'component' => 'Switcher',
'title' => __( 'Responsive on mobile', 'yaymail' ),
'default_value' => isset( $attributes['responsive_on_mobile'] ) ? (bool) $attributes['responsive_on_mobile'] : false,
'type' => 'content',
],
'title_color' => ElementsHelper::get_color(
$attributes,
[
'value_path' => 'title_color',
'title' => __( 'Title color', 'yaymail' ),
'default_value' => YAYMAIL_COLOR_WC_DEFAULT,
]
),
'text_color' => ElementsHelper::get_color(
$attributes,
[
'value_path' => 'text_color',
'title' => __( 'Text color', 'yaymail' ),
'default_value' => YAYMAIL_COLOR_TEXT_DEFAULT,
]
),
'border_color' => ElementsHelper::get_color(
$attributes,
[
'value_path' => 'border_color',
'title' => __( 'Table border color', 'yaymail' ),
'default_value' => YAYMAIL_COLOR_BORDER_DEFAULT,
]
),
'font_family' => ElementsHelper::get_font_family_selector( $attributes ),
'billing_title' => ElementsHelper::get_rich_text(
$attributes,
[
'value_path' => 'billing_title',
'title' => __( 'Billing title', 'yaymail' ),
'default_value' => '' . __( 'Billing Address', 'woocommerce' ) . '',
'editor_id' => 'bsa_billing_title',
]
),
'billing_content_font_size' => ElementsHelper::get_dimension(
$attributes,
[
'value_path' => 'billing_content_font_size',
'title' => __( 'Billing content font size', 'yaymail' ),
'default_value' => '14',
'min' => 8,
'max' => 25,
'unit' => 'px',
'type' => 'style',
]
),
'billing_content_alignment' => ElementsHelper::get_align(
$attributes,
[
'value_path' => 'billing_content_alignment',
'title' => __( 'Billing content alignment', 'yaymail' ),
'default_value' => 'left',
]
),
'billing_content_text_format' => ElementsHelper::get_text_format_toggles(
$attributes,
[
'value_path' => 'billing_content_text_format',
'title' => __( 'Billing address text formatting', 'yaymail' ),
]
),
'shipping_title' => ElementsHelper::get_rich_text(
$attributes,
[
'value_path' => 'shipping_title',
'title' => __( 'Shipping title', 'yaymail' ),
'default_value' => '' . __( 'Shipping Address', 'woocommerce' ) . '',
'editor_id' => 'bsa_shipping_title',
]
),
'shipping_content_font_size' => ElementsHelper::get_dimension(
$attributes,
[
'value_path' => 'shipping_content_font_size',
'title' => __( 'Shipping content font size', 'yaymail' ),
'default_value' => '14',
'min' => 8,
'max' => 25,
'unit' => 'px',
'type' => 'style',
]
),
'shipping_content_alignment' => ElementsHelper::get_align(
$attributes,
[
'value_path' => 'shipping_content_alignment',
'title' => __( 'Shipping content alignment', 'yaymail' ),
'default_value' => 'left',
]
),
'shipping_content_text_format' => ElementsHelper::get_text_format_toggles(
$attributes,
[
'value_path' => 'shipping_content_text_format',
'title' => __( 'Shipping address text formatting', 'yaymail' ),
]
),
'shipping_address_content' => [
'value_path' => 'shipping_address_content',
'component' => '',
'title' => __( 'Shipping Content', 'yaymail' ),
'default_value' => '[yaymail_shipping_address]',
'type' => 'content',
],
'billing_address_content' => [
'value_path' => 'billing_address_content',
'component' => '',
'title' => __( 'Billing Content', 'yaymail' ),
'default_value' => '[yaymail_billing_address]',
'type' => 'content',
],
],
];
return $result;
}
}