<?php
namespace Softech_Addons_for_Elementor\Widgets;
if (!defined('ABSPATH'))
    exit;

use Elementor\Widget_Base;
use Elementor\Controls_Manager;
use Elementor\Repeater;


class sitsel_blob_shapes extends Widget_Base
{

    public function get_name()
    {
        return 'sitsel_blob_shape';
    }

    public function get_title()
    {
        return __('SITS Blob Shape',  'softech-addons-for-elementor');
    }

    public function get_icon()
    {
        return 'eicon-shape';
    }

    public function get_categories()
    {
        return ['sits-category']; 
    }

    public function softech_blobe_shape_array() {
		return [			
				'shape1' => 'Shape 1 - Rounded',
                'shape2' => 'Shape 2 - Wavy',
                'shape3' => 'Shape 3 - Organic',
                'shape4' => 'Shape 4 - Flowing',
                'shape5' => 'Shape 5 - Bubble',
                'shape6' => 'Shape 6 - Smooth',
                'shape7' => 'Shape 7 - Curvy',
                'shape8' => 'Shape 8 - Twisted',
                'shape9' => 'Shape 9 - Fluid',
                'shape10' => 'Shape 10 - Natural',
                'shape11' => 'Shape 11 - Abstract',
                'animated' => 'Animated Morphing',		
	   ];
	}

    public function get_style_depends()
{
    wp_enqueue_style(
        'sitsel-blob-shapes',
        plugins_url('assets/css/blob-shapes.css', dirname(__FILE__)),
        [],
        '1.0.0'
    );
    return ['sitsel-blob-shapes'];
}

   
    protected function register_controls()
    {
        // BLOB SETTINGS TAB
        $this->start_controls_section(
            'content_section',
            [
                'label' => __('Blob Settings', 'softech-addons-for-elementor'),
                'tab'   => \Elementor\Controls_Manager::TAB_CONTENT,
            ]
        );

        $this->add_control(
            'blob_shape',
            [
                'label' => __('Shape Type', 'softech-addons-for-elementor'),
                'type' => \Elementor\Controls_Manager::SELECT,
                'default' => 'shape1',
                 'options' => $this->softech_blobe_shape_array(),
            ]
        );

        

        $this->add_responsive_control(
            'blob_width',
            [
                'label' => __('Width', 'softech-addons-for-elementor'),
                'type' => \Elementor\Controls_Manager::SLIDER,
                'size_units' => ['px', '%'],
                'range' => [
                    'px' => [
                        'min' => 50,
                        'max' => 1000,
                    ],
                    '%' => [
                        'min' => 10,
                        'max' => 100,
                    ],
                ],
                'default' => [
                    'unit' => 'px',
                    'size' => 300,
                ],
                'selectors' => [
                    '{{WRAPPER}} .sitsel-blob-shape' => 'width: {{SIZE}}{{UNIT}};',
                ],
            ]
        );

        // NEW HEIGHT CONTROL
        $this->add_responsive_control(
            'blob_height',
            [
                'label' => __('Height', 'softech-addons-for-elementor'),
                'type' => \Elementor\Controls_Manager::SLIDER,
                'size_units' => ['px', '%'],
                'range' => [
                    'px' => [
                        'min' => 50,
                        'max' => 1000,
                    ],
                    '%' => [
                        'min' => 10,
                        'max' => 100,
                    ],
                ],
                'default' => [
                    'unit' => 'px',
                    'size' => 300,
                ],
                'selectors' => [
                    '{{WRAPPER}} .sitsel-blob-shape' => 'height: {{SIZE}}{{UNIT}};',
                ],
            ]
        );

        $this->add_control(
            'blob_aspect_ratio_enable',
            [
                'label' => __('Maintain 1:1 Aspect Ratio', 'softech-addons-for-elementor'),
                'type' => \Elementor\Controls_Manager::SWITCHER,
                'label_on' => __('Yes', 'softech-addons-for-elementor'),
                'label_off' => __('No', 'softech-addons-for-elementor'),
                'return_value' => 'yes',
                'default' => '', // No by default
                'selectors' => [
                    '{{WRAPPER}} .sitsel-blob-shape' => 'aspect-ratio: 1 / 1; height: auto !important;',
                ],
            ]
        );
// $this->add_responsive_control(
//     'blob_justify',
//     [
//         'label' => __('Justify', 'softech-addons-for-elementor'),
//         'type' => \Elementor\Controls_Manager::SELECT,
//         'default' => 'center',
//         'options' => [
//             'start' => __('Start', 'softech-addons-for-elementor'),
//             'center' => __('Center', 'softech-addons-for-elementor'),
//             'end' => __('End', 'softech-addons-for-elementor'),
//         ],
//         'selectors' => [
//             '{{WRAPPER}} .sitsel-blob-shape' => 'margin-left: {{VALUE}}; margin-right: {{VALUE}};',
//         ],
//         'selectors_dictionary' => [
//             'start' => '0',
//             'center' => 'auto',
//             'end' => 'auto 0 auto auto',
//         ],
//     ]
// );
        // // ANIMATION TIME CONTROL (only shows when animated is selected)
        // $this->add_control(
        //     'animation_time',
        //     [
        //         'label' => __('Animation Time (seconds)', 'softech-addons-for-elementor'),
        //         'type' => \Elementor\Controls_Manager::NUMBER,
        //         'default' => 6,
        //         'min' => 1,
        //         'max' => 20,
        //         'step' => 0.5,
        //         'condition' => [
        //             'blob_shape' => 'animated',
        //         ],
        //         'selectors' => [
        //             '{{WRAPPER}} .sitsel-blob-animated' => 'animation-duration: {{VALUE}}s;',
        //         ],
        //     ]
        // );

       

        $this->end_controls_section();

        // LINK TAB
        $this->start_controls_section(
            'link_section',
            [
                'label' => __('Link', 'softech-addons-for-elementor'),
                'tab'   => \Elementor\Controls_Manager::TAB_CONTENT,
            ]
        );

        $this->add_control(
            'blob_link',
            [
                'label' => __('Link (Optional)', 'softech-addons-for-elementor'),
                'type' => \Elementor\Controls_Manager::URL,
                'placeholder' => __('https://your-link.com', 'softech-addons-for-elementor'),
                'default' => [
                    'url' => '',
                    'is_external' => true,
                    'nofollow' => true,
                ],
            ]
        );

        $this->end_controls_section();

        // BLOB CONTENT TAB
        $this->start_controls_section(
            'blob_content_section',
            [
                'label' => __('Blob Content', 'softech-addons-for-elementor'),
                'tab'   => \Elementor\Controls_Manager::TAB_CONTENT,
            ]
        );

        $this->add_control(
            'show_title',
            [
                'label' => __('Show Title', 'softech-addons-for-elementor'),
                'type' => \Elementor\Controls_Manager::SWITCHER,
                'label_on' => __('Yes', 'softech-addons-for-elementor'),
                'label_off' => __('No', 'softech-addons-for-elementor'),
                'return_value' => 'yes',
                'default' => '',
            ]
        );

        $this->add_control(
            'blob_title',
            [
                'label' => __('Title', 'softech-addons-for-elementor'),
                'type' => \Elementor\Controls_Manager::TEXT,
                'default' => __('Blob Title', 'softech-addons-for-elementor'),
                'placeholder' => __('Enter your title', 'softech-addons-for-elementor'),
                'condition' => [
                    'show_title' => 'yes',
                ],
            ]
        );

        $this->add_control(
            'show_text',
            [
                'label' => __('Show Text', 'softech-addons-for-elementor'),
                'type' => \Elementor\Controls_Manager::SWITCHER,
                'label_on' => __('Yes', 'softech-addons-for-elementor'),
                'label_off' => __('No', 'softech-addons-for-elementor'),
                'return_value' => 'yes',
                'default' => '',
            ]
        );

        $this->add_control(
    'blob_text',
    [
        'label' => __('Text', 'softech-addons-for-elementor'),
        'type' => \Elementor\Controls_Manager::TEXTAREA,
        'default' => __('Your blob content text here.', 'softech-addons-for-elementor'),
        'placeholder' => __('Enter your text', 'softech-addons-for-elementor'),
        'rows' => 5,
        'maxlength' => 200,
        'description' => __('Adjust the widget’s width and height to fit your content properly', 'softech-addons-for-elementor'),
        'condition' => [
            'show_text' => 'yes',
        ],
    ]
);

        $this->end_controls_section();

        // STYLE TAB - GRADIENT SUB TAB
        $this->start_controls_section(
            'gradient_section',
            [
                'label' => __('Gradient', 'softech-addons-for-elementor'),
                'tab' => \Elementor\Controls_Manager::TAB_STYLE,
            ]
        );

        $this->add_control(
    'gradient_angle',
    [
        'label' => __('Gradient Angle', 'softech-addons-for-elementor'),
        'type' => \Elementor\Controls_Manager::SLIDER,
        'render_type' => 'ui',
        'range' => [
                    'px' => [
                        'min' => 0,
                        'max' => 360,
                        'step' => 1,
                    ],
                ],
                'default' => [
                    'size' => 45,
                ],
                'selectors' => [
                    '{{WRAPPER}} .sitsel-blob-shape' => '--gradient-angle: {{SIZE}}deg;',
                ],
            ]
        );

        $this->add_control(
    'fade_offset',
    [
        'label' => __('Fade Offset', 'softech-addons-for-elementor'),
        'type' => \Elementor\Controls_Manager::SLIDER,
        'render_type' => 'ui',
        'range' => [
                    'px' => [
                        'min' => 0,
                        'max' => 100,
                        'step' => 1,
                    ],
                ],
                'default' => [
                    'size' => 50,
                ],
            ]
        );

        $this->add_control(
    'bg_color_01',
    [
        'label' => __('Background Color 01', 'softech-addons-for-elementor'),
        'type' => \Elementor\Controls_Manager::COLOR,
        'render_type' => 'ui',
                'default' => '#ff6f61',
                'selectors' => [
                    '{{WRAPPER}} .sitsel-blob-shape' => '--bg-color-01: {{VALUE}};',
                ],
            ]
        );

       $this->add_control(
    'bg_color_02',
    [
        'label' => __('Background Color 02', 'softech-addons-for-elementor'),
        'type' => \Elementor\Controls_Manager::COLOR,
        'default' => '#6b5b95',
        'render_type' => 'ui',
                'description' => __('Use second color for gradient', 'softech-addons-for-elementor'),
                'selectors' => [
                    '{{WRAPPER}} .sitsel-blob-shape' => '--bg-color-02: {{VALUE}};',
                ],
            ]
        );

        $this->add_control(
    'color_01_offset',
    [
        'label' => __('Color 01 Offset', 'softech-addons-for-elementor'),
        'type' => \Elementor\Controls_Manager::SLIDER,
        'render_type' => 'ui',
        'range' => [
                    'px' => [
                        'min' => 0,
                        'max' => 100,
                        'step' => 1,
                    ],
                ],
                'default' => [
                    'size' => 11,
                ],
                'selectors' => [
                    '{{WRAPPER}} .sitsel-blob-shape' => '--color-01-offset: {{SIZE}}%;',
                ],
            ]
        );

        $this->add_control(
    'color_02_offset',
    [
        'label' => __('Color 02 Offset', 'softech-addons-for-elementor'),
        'type' => \Elementor\Controls_Manager::SLIDER,
        'render_type' => 'ui',
        'range' => [
                    'px' => [
                        'min' => 0,
                        'max' => 100,
                        'step' => 1,
                    ],
                ],
                'default' => [
                    'size' => 100,
                ],
                'selectors' => [
                    '{{WRAPPER}} .sitsel-blob-shape' => '--color-02-offset: {{SIZE}}%;',
                ],
            ]
        );

      $this->add_control(
    'enable_shadow',
    [
        'label' => __('Enable Shadow', 'softech-addons-for-elementor'),
        'type' => \Elementor\Controls_Manager::SWITCHER,
        'render_type' => 'ui',
        'label_on' => __('Yes', 'softech-addons-for-elementor'),
        'label_off' => __('No', 'softech-addons-for-elementor'),
        'return_value' => 'yes',
        'default' => '',
    ]
);
       $this->add_control(
    'shadow_automatic_note',
    [
        'type' => \Elementor\Controls_Manager::RAW_HTML,
        'raw' => '<p style="color: #666; font-size: 12px;">Customize the shadow color, size, blur, and position to match your design.</p>',
        'condition' => [
            'enable_shadow' => 'yes',
        ],
    ]
);
       



$this->add_control(
    'shadow_color',
    [
        'label' => __('Shadow Color', 'softech-addons-for-elementor'),
        'type' => \Elementor\Controls_Manager::COLOR,
        'default' => 'rgba(0,0,0,0.3)',
        'render_type' => 'ui',
        'condition' => [
            'enable_shadow' => 'yes',
        ],
        'selectors' => [
            '{{WRAPPER}} .sitsel-blob-shape' => '--shadow-color: {{VALUE}};',
        ],
    ]
);

$this->add_responsive_control(
    'shadow_size',
    [
        'label' => __('Shadow Size', 'softech-addons-for-elementor'),
        'type' => \Elementor\Controls_Manager::SLIDER,
        'render_type' => 'ui',
        'range' => [
            'px' => [
                'min' => 0,
                'max' => 100,
                'step' => 1,
            ],
        ],
        'default' => [
            'size' => 30,
        ],
        'condition' => [
            'enable_shadow' => 'yes',
        ],
        'selectors' => [
            '{{WRAPPER}} .sitsel-blob-shape' => '--shadow-size: {{SIZE}}px;',
        ],
    ]
);

$this->add_responsive_control(
    'shadow_blur',
    [
        'label' => __('Shadow Blur', 'softech-addons-for-elementor'),
        'type' => \Elementor\Controls_Manager::SLIDER,
        'render_type' => 'ui',
        'range' => [
            'px' => [
                'min' => 0,
                'max' => 50,
                'step' => 1,
            ],
        ],
        'default' => [
            'size' => 14,
        ],
        'condition' => [
            'enable_shadow' => 'yes',
        ],
        'selectors' => [
            '{{WRAPPER}} .sitsel-blob-shape' => '--shadow-blur: {{SIZE}}px;',
        ],
    ]
);

$this->add_responsive_control(
    'shadow_vertical_shift',
    [
        'label' => __('Shadow Vertical Shift', 'softech-addons-for-elementor'),
        'type' => \Elementor\Controls_Manager::SLIDER,
        'render_type' => 'ui',
        'range' => [
            'px' => [
                'min' => -100,
                'max' => 100,
                'step' => 1,
            ],
        ],
        'default' => [
            'size' => -143,
        ],
        'condition' => [
            'enable_shadow' => 'yes',
        ],
        'selectors' => [
            '{{WRAPPER}} .sitsel-blob-shape' => '--shadow-y: {{SIZE}}px;',
        ],
    ]
);

$this->add_responsive_control(
    'shadow_horizontal_shift',
    [
        'label' => __('Shadow Horizontal Shift', 'softech-addons-for-elementor'),
        'type' => \Elementor\Controls_Manager::SLIDER,
        'render_type' => 'ui',
        'range' => [
            'px' => [
                'min' => -100,
                'max' => 100,
                'step' => 1,
            ],
        ],
        'default' => [
            'size' => 9,
        ],
        'condition' => [
            'enable_shadow' => 'yes',
        ],
        'selectors' => [
            '{{WRAPPER}} .sitsel-blob-shape' => '--shadow-x: {{SIZE}}px;',
        ],
    ]
);

        $this->end_controls_section();

        // STYLE TAB - IMAGE SUB TAB
        $this->start_controls_section(
            'image_section',
            [
                'label' => __('Image', 'softech-addons-for-elementor'),
                'tab' => \Elementor\Controls_Manager::TAB_STYLE,
            ]
        );

        $this->add_control(
            'blob_image',
            [
                'label' => __('Background Image', 'softech-addons-for-elementor'),
                'type' => \Elementor\Controls_Manager::MEDIA,
                'default' => [
                    'url' => '',
                ],
                'selectors' => [
                    '{{WRAPPER}} .sitsel-blob-shape::after' => 'background-image: url("{{URL}}");',
                ],
            ]
        );

        $this->add_control(
    'image_opacity',
    [
        'label' => __('Image Opacity', 'softech-addons-for-elementor'),
        'type' => \Elementor\Controls_Manager::SLIDER,
        'render_type' => 'ui',
        'range' => [
                    'px' => [
                        'min' => 0,
                        'max' => 100,
                        'step' => 1,
                    ],
                ],
                'default' => [
                    'size' => 100,
                ],
                'selectors' => [
                    '{{WRAPPER}} .sitsel-blob-shape' => '--image-opacity: {{SIZE}};',
                ],
            ]
        );

       $this->add_control(
    'blend_mode',
    [
        'label' => __('Blend Mode', 'softech-addons-for-elementor'),
        'type' => \Elementor\Controls_Manager::SELECT,
        'default' => 'normal',
        'render_type' => 'ui',
                'options' => [
                    'normal' => __('Normal', 'softech-addons-for-elementor'),
                    'multiply' => __('Multiply', 'softech-addons-for-elementor'),
                    'screen' => __('Screen', 'softech-addons-for-elementor'),
                    'overlay' => __('Overlay', 'softech-addons-for-elementor'),
                    'soft-light' => __('Soft Light', 'softech-addons-for-elementor'),
                    'hard-light' => __('Hard Light', 'softech-addons-for-elementor'),
                    'color-dodge' => __('Color Dodge', 'softech-addons-for-elementor'),
                    'color-burn' => __('Color Burn', 'softech-addons-for-elementor'),
                    'darken' => __('Darken', 'softech-addons-for-elementor'),
                    'lighten' => __('Lighten', 'softech-addons-for-elementor'),
                    'difference' => __('Difference', 'softech-addons-for-elementor'),
                    'exclusion' => __('Exclusion', 'softech-addons-for-elementor'),
                ],
                'selectors' => [
                    '{{WRAPPER}} .sitsel-blob-shape::after' => 'mix-blend-mode: {{VALUE}};',
                ],
            ]
        );

        $this->add_control(
    'image_position',
    [
        'label' => __('Image Position', 'softech-addons-for-elementor'),
        'type' => \Elementor\Controls_Manager::SELECT,
        'default' => 'center center',
        'render_type' => 'ui',
                'options' => [
                    'center center' => __('Center Center', 'softech-addons-for-elementor'),
                    'center top' => __('Center Top', 'softech-addons-for-elementor'),
                    'center bottom' => __('Center Bottom', 'softech-addons-for-elementor'),
                    'left top' => __('Left Top', 'softech-addons-for-elementor'),
                    'left center' => __('Left Center', 'softech-addons-for-elementor'),
                    'left bottom' => __('Left Bottom', 'softech-addons-for-elementor'),
                    'right top' => __('Right Top', 'softech-addons-for-elementor'),
                    'right center' => __('Right Center', 'softech-addons-for-elementor'),
                    'right bottom' => __('Right Bottom', 'softech-addons-for-elementor'),
                ],
                'selectors' => [
                    '{{WRAPPER}} .sitsel-blob-shape::after' => 'background-position: {{VALUE}};',
                ],
            ]
        );

        $this->end_controls_section();

        // STYLE TAB - TYPOGRAPHY SUB TAB
        $this->start_controls_section(
            'typography_section',
            [
                'label' => __('Typography', 'softech-addons-for-elementor'),
                'tab' => \Elementor\Controls_Manager::TAB_STYLE,
            ]
        );

       $this->add_control(
    'title_color',
    [
        'label' => __('Title Color', 'softech-addons-for-elementor'),
        'type' => \Elementor\Controls_Manager::COLOR,
        'default' => '#ffffff',
        'render_type' => 'ui',
                'selectors' => [
                    '{{WRAPPER}} .sitsel-blob-title' => 'color: {{VALUE}};',
                ],
                'condition' => [
                    'show_title' => 'yes',
                ],
            ]
        );

        $this->add_group_control(
    \Elementor\Group_Control_Typography::get_type(),
    [
        'name' => 'title_typography',
        'label' => __('Title Typography', 'softech-addons-for-elementor'),
        'selector' => '{{WRAPPER}} .sitsel-blob-title',
        'render_type' => 'ui',
                'condition' => [
                    'show_title' => 'yes',
                ],
            ]
        );

        $this->add_control(
    'text_color',
    [
        'label' => __('Text Color', 'softech-addons-for-elementor'),
        'type' => \Elementor\Controls_Manager::COLOR,
        'default' => '#ffffff',
        'render_type' => 'ui',
                'selectors' => [
                    '{{WRAPPER}} .sitsel-blob-text' => 'color: {{VALUE}};',
                ],
                'condition' => [
                    'show_text' => 'yes',
                ],
            ]
        );

        $this->add_group_control(
    \Elementor\Group_Control_Typography::get_type(),
    [
        'name' => 'text_typography',
        'label' => __('Text Typography', 'softech-addons-for-elementor'),
        'selector' => '{{WRAPPER}} .sitsel-blob-text',
        'render_type' => 'ui',
                'condition' => [
                    'show_text' => 'yes',
                ],
            ]
        );

        $this->add_responsive_control(
    'typography_padding',
    [
        'label' => __('Typography Padding', 'softech-addons-for-elementor'),
        'type' => \Elementor\Controls_Manager::DIMENSIONS,
        'render_type' => 'ui',
                'size_units' => ['px', '%', 'em'],
                'default' => [
                    'top' => '30',
                    'right' => '30',
                    'bottom' => '30',
                    'left' => '30',
                    'unit' => 'px',
                    'isLinked' => true,
                ],
                'selectors' => [
                    '{{WRAPPER}} .sitsel-blob-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
                ],
            ]
        );

        $this->add_responsive_control(
    'text_spacing',
    [
        'label' => __('Text Spacing', 'softech-addons-for-elementor'),
        'type' => \Elementor\Controls_Manager::SLIDER,
        'render_type' => 'ui',
        'range' => [
                    'px' => [
                        'min' => 0,
                        'max' => 50,
                    ],
                ],
                'default' => [
                    'size' => 5,
                ],
                'selectors' => [
                    '{{WRAPPER}} .sitsel-blob-title' => 'margin-bottom: {{SIZE}}{{UNIT}};',
                ],
                'condition' => [
                    'show_title' => 'yes',
                    'show_text' => 'yes',
                ],
            ]
        );

        $this->add_responsive_control(
    'align_horizontal',
    [
        'label' => __('Align Horizontal', 'softech-addons-for-elementor'),
        'type' => \Elementor\Controls_Manager::CHOOSE,
        'render_type' => 'ui',
                'options' => [
                    'left' => [
                        'title' => __('Left', 'softech-addons-for-elementor'),
                        'icon' => 'eicon-text-align-left',
                    ],
                    'center' => [
                        'title' => __('Center', 'softech-addons-for-elementor'),
                        'icon' => 'eicon-text-align-center',
                    ],
                    'right' => [
                        'title' => __('Right', 'softech-addons-for-elementor'),
                        'icon' => 'eicon-text-align-right',
                    ],
                ],
                'default' => 'center',
                'selectors' => [
                    '{{WRAPPER}} .sitsel-blob-content' => 'text-align: {{VALUE}};',
                ],
            ]
        );

       $this->add_responsive_control(
    'align_vertical',
    [
        'label' => __('Align Vertical', 'softech-addons-for-elementor'),
        'type' => \Elementor\Controls_Manager::CHOOSE,
        'render_type' => 'ui',
                'options' => [
                    'flex-start' => [
                        'title' => __('Top', 'softech-addons-for-elementor'),
                        'icon' => 'eicon-v-align-top',
                    ],
                    'center' => [
                        'title' => __('Center', 'softech-addons-for-elementor'),
                        'icon' => 'eicon-v-align-middle',
                    ],
                    'flex-end' => [
                        'title' => __('Bottom', 'softech-addons-for-elementor'),
                        'icon' => 'eicon-v-align-bottom',
                    ],
                ],
                'default' => 'center',
                'selectors' => [
                    '{{WRAPPER}} .sitsel-blob-content' => 'align-items: {{VALUE}};',
                ],
            ]
        );

        $this->end_controls_section();
    }

    protected function render()
    {
        $settings = $this->get_settings_for_display();
        $shape_class = 'sitsel-blob-' . esc_attr($settings['blob_shape']);
        
        // Link wrapper
        $link_attrs = '';
        if (!empty($settings['blob_link']['url'])) {
            $this->add_link_attributes('blob_link', $settings['blob_link']);
            $link_attrs = $this->get_render_attribute_string('blob_link');
        }
?>
        <?php if (!empty($settings['blob_link']['url'])): ?>
            <a <?php echo wp_kses_post($link_attrs); ?>>
        <?php endif; ?>
        
        <div class="sitsel-blob-shape <?php echo esc_attr($shape_class); ?>">
    <?php if ($settings['show_title'] === 'yes' || $settings['show_text'] === 'yes'): ?>
        <div class="sitsel-blob-content">
            <?php if ($settings['show_title'] === 'yes' && !empty($settings['blob_title'])): ?>
                <h3 class="sitsel-blob-title"><?php echo esc_html($settings['blob_title']); ?></h3>
            <?php endif; ?>
            
            <?php if ($settings['show_text'] === 'yes' && !empty($settings['blob_text'])): ?>
                <p class="sitsel-blob-text"><?php echo esc_html($settings['blob_text']); ?></p>
            <?php endif; ?>
        </div>
    <?php endif; ?>
</div>

        <?php if (!empty($settings['blob_link']['url'])): ?>
            </a>
        <?php endif; ?>
<?php
    }
    

    
}
