'; return [ 'id' => uniqid(), 'type' => self::$type, 'name' => __( 'Image', 'yaymail' ), 'icon' => self::$icon, 'group' => 'basic', 'available' => true, 'position' => 30, 'data' => [ 'container_group_definition' => [ 'component' => 'GroupDefinition', 'title' => __( 'Container settings', 'yaymail' ), 'description' => __( 'Handle container layout settings', 'yaymail' ), ], 'padding' => [ 'value_path' => 'padding', 'component' => 'Spacing', 'title' => __( 'Padding', 'yaymail' ), 'default_value' => isset( $attributes['padding'] ) ? $attributes['padding'] : [ 'top' => '15', 'right' => '50', 'bottom' => '15', 'left' => '50', ], 'type' => 'style', ], 'background_color' => [ 'value_path' => 'background_color', 'component' => 'Color', 'title' => __( 'Background color', 'yaymail' ), 'default_value' => isset( $attributes['background_color'] ) ? $attributes['background_color'] : '#fff', 'type' => 'style', ], 'image_breaker' => [ 'component' => 'LineBreaker', ], 'image_group_definition' => [ 'component' => 'GroupDefinition', 'title' => __( 'Image settings', 'yaymail' ), 'description' => __( 'Handle image settings', 'yaymail' ), ], 'src' => [ 'value_path' => 'src', 'component' => 'Media', 'title' => __( 'Source image', 'yaymail' ), 'default_value' => isset( $attributes['src'] ) ? $attributes['src'] : $default_src, 'type' => 'content', ], 'align' => [ 'value_path' => 'align', 'component' => 'Align', 'title' => __( 'Image position', 'yaymail' ), 'default_value' => isset( $attributes['align'] ) ? $attributes['align'] : 'center', 'type' => 'style', ], 'width' => [ 'value_path' => 'width', 'component' => 'Dimension', 'title' => __( 'Width', 'yaymail' ), 'default_value' => isset( $attributes['width'] ) ? $attributes['width'] : '252', 'type' => 'style', ], 'url' => [ 'value_path' => 'url', 'component' => 'TextInput', 'title' => __( 'Open link', 'yaymail' ), 'default_value' => isset( $attributes['url'] ) ? $attributes['url'] : '#', 'type' => 'content', ], 'alt' => ElementsHelper::get_text_input( $attributes, [ 'value_path' => 'alt', 'title' => __( 'ALT text', 'yaymail' ), 'default_value' => '', ] ), ], ]; } }