';
return [
'id' => uniqid(),
'type' => self::$type,
'name' => __( 'Image List', 'yaymail' ),
'icon' => self::$icon,
'group' => 'basic',
'available' => true,
'position' => 110,
'data' => [
'container_group_definition' => [
'component' => 'GroupDefinition',
'title' => __( 'Container settings', 'yaymail' ),
'description' => __( 'Handle container layout settings', 'yaymail' ),
],
'background_color' => [
'value_path' => 'background_color',
'component' => 'Color',
'title' => __( 'Background color', 'yaymail' ),
'default_value' => isset( $attributes['background_color'] ) ? $attributes['background_color'] : '#fff',
'type' => 'style',
],
'number_column' => [
'value_path' => 'number_column',
'component' => 'NumberColumn',
'title' => __( 'Number of columns:', 'yaymail' ),
'default_value' => isset( $attributes['number_column'] ) ? $attributes['number_column'] : 3,
'type' => 'content',
],
'column_breaker' => [
'component' => 'LineBreaker',
],
'column_settings' => [
'component' => 'GroupDefinition',
'title' => __( 'Column settings', 'yaymail' ),
'description' => __( 'Handle column settings', 'yaymail' ),
],
'image_list' => [
'value_path' => 'image_list',
'component' => 'ImageList',
'default_value' => [
'column_1' => [
'align' => [
'value' => isset( $attributes['column_1']['align'] ) ? $attributes['column_1']['align'] : 'center',
'type' => 'style',
],
'padding' => [
'value' => isset( $attributes['column_1']['padding'] ) ? $attributes['column_1']['padding'] : [
'top' => '10',
'right' => '10',
'bottom' => '10',
'left' => '50',
],
'type' => 'style',
],
'image' => [
'value' => isset( $attributes['column_1']['image'] ) ? $attributes['column_1']['image'] : $src,
'type' => 'content',
],
'width' => [
'value' => isset( $attributes['column_1']['width'] ) ? $attributes['column_1']['width'] : '100',
'type' => 'style',
],
'background_color' => [
'value' => isset( $attributes['column_1']['background_color'] ) ? $attributes['column_1']['background_color'] : '#fff',
'type' => 'style',
],
'url' => [
'value' => isset( $attributes['column_1']['url'] ) ? $attributes['column_1']['url'] : '#',
'type' => 'content',
],
'alt' => [
'value' => isset( $attributes['column_1']['alt'] ) ? $attributes['column_1']['alt'] : '',
'type' => 'content',
],
],
'column_2' => [
'align' => [
'value' => isset( $attributes['column_2']['align'] ) ? $attributes['column_2']['align'] : 'center',
'type' => 'style',
],
'padding' => [
'value' => isset( $attributes['column_2']['padding'] ) ? $attributes['column_2']['padding'] : [
'top' => '10',
'right' => '10',
'bottom' => '10',
'left' => '50',
],
'type' => 'style',
],
'image' => [
'value' => isset( $attributes['column_2']['image'] ) ? $attributes['column_2']['image'] : $src,
'type' => 'content',
],
'width' => [
'value' => isset( $attributes['column_2']['width'] ) ? $attributes['column_2']['width'] : '100',
'type' => 'style',
],
'background_color' => [
'value' => isset( $attributes['column_2']['background_color'] ) ? $attributes['column_2']['background_color'] : '#fff',
'type' => 'style',
],
'url' => [
'value' => isset( $attributes['column_2']['url'] ) ? $attributes['column_2']['url'] : '#',
'type' => 'content',
],
'alt' => [
'value' => isset( $attributes['column_2']['alt'] ) ? $attributes['column_2']['alt'] : '',
'type' => 'content',
],
],
'column_3' => [
'align' => [
'value' => isset( $attributes['column_3']['align'] ) ? $attributes['column_3']['align'] : 'center',
'type' => 'style',
],
'padding' => [
'value' => isset( $attributes['column_3']['padding'] ) ? $attributes['column_3']['padding'] : [
'top' => '10',
'right' => '10',
'bottom' => '10',
'left' => '50',
],
'type' => 'style',
],
'image' => [
'value' => isset( $attributes['column_3']['image'] ) ? $attributes['column_3']['image'] : $src,
'type' => 'content',
],
'width' => [
'value' => isset( $attributes['column_3']['width'] ) ? $attributes['column_3']['width'] : '100',
'type' => 'style',
],
'background_color' => [
'value' => isset( $attributes['column_3']['background_color'] ) ? $attributes['column_3']['background_color'] : '#fff',
'type' => 'style',
],
'url' => [
'value' => isset( $attributes['column_3']['url'] ) ? $attributes['column_3']['url'] : '#',
'type' => 'content',
],
'alt' => [
'value' => isset( $attributes['column_3']['alt'] ) ? $attributes['column_3']['alt'] : '',
'type' => 'content',
],
],
],
],
],
];
}
}