'; return [ 'id' => uniqid(), 'type' => self::$type, 'name' => __( 'Rating Stars', 'yaymail' ), 'icon' => self::$icon, 'group' => 'basic', 'available' => true, 'position' => 151, 'status_info' => [ 'text' => __( 'New', 'yaymail' ), ], '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' => '15', 'bottom' => '15', 'left' => '15', ], 'type' => 'style', ], 'background_color' => ElementsHelper::get_color( $attributes, [ 'default_value' => isset( $attributes['background_color'] ) ? $attributes['background_color'] : '#fff', ] ), 'align' => ElementsHelper::get_align( $attributes ), 'content_breaker' => [ 'component' => 'LineBreaker', ], 'content_group_definition' => [ 'component' => 'GroupDefinition', 'title' => __( 'Content settings', 'yaymail' ), 'description' => __( 'Handle content settings', 'yaymail' ), ], 'total_stars' => [ 'value_path' => 'total_stars', 'component' => 'NumberInput', 'title' => __( 'Total stars', 'yaymail' ), 'default_value' => isset( $attributes['total_stars'] ) ? $attributes['total_stars'] : '5', 'min' => 1, 'max' => 10, 'type' => 'style', ], 'active_stars' => [ 'value_path' => 'active_stars', 'component' => 'NumberInput', 'title' => __( 'Active stars', 'yaymail' ), 'default_value' => isset( $attributes['active_stars'] ) ? $attributes['active_stars'] : '5', 'min' => 0, 'max' => 10, 'max_dependency' => 'total_stars', 'type' => 'style', ], 'active_stars_color' => ElementsHelper::get_color( $attributes, [ 'title' => __( 'Active color', 'yaymail' ), 'description' => __( 'The color of the active stars', 'yaymail' ), 'value_path' => 'active_stars_color', 'default_value' => isset( $attributes['active_stars_color'] ) ? $attributes['active_stars_color'] : '#FFD700', ] ), 'inactive_stars_color' => ElementsHelper::get_color( $attributes, [ 'title' => __( 'Inactive color', 'yaymail' ), 'description' => __( 'The color of the inactive stars', 'yaymail' ), 'value_path' => 'inactive_stars_color', 'default_value' => isset( $attributes['inactive_stars_color'] ) ? $attributes['inactive_stars_color'] : '#E0E0E0', ] ), 'size' => ElementsHelper::get_dimension( $attributes, [ 'value_path' => 'size', 'title' => __( 'Size', 'yaymail' ), 'default_value' => isset( $attributes['size'] ) ? $attributes['size'] : '40', 'min' => 10, 'max' => 100, ] ), 'spacing' => ElementsHelper::get_dimension( $attributes, [ 'value_path' => 'spacing', 'title' => __( 'Spacing', 'yaymail' ), 'default_value' => isset( $attributes['spacing'] ) ? $attributes['spacing'] : '10', 'min' => 10, 'max' => 25, 'type' => 'style', ] ), ], ]; } }