<?php

namespace WPT\Cf7Divi\Divi5\Modules\ContactForm7Module\ContactForm7ModuleTraits;

if (! defined('ABSPATH')) {
    die('Direct access forbidden.');
}

use ET\Builder\Packages\StyleLibrary\Utils\StyleDeclarations;
use ET\Builder\Packages\IconLibrary\IconFont\Utils;

trait StyleDeclarationTrait
{
   
    /* Flex alignment for button container */
    public static function flex_alignment_declaration($args)
    {
        $value = '';

        $style_declarations = new StyleDeclarations(
            [
                'returnType' => 'string',
                'important'  => false,
            ]
        );

        if (isset($args['attrValue'], $args['attrValue']['alignment']) && is_string($args['attrValue']['alignment'])) {
            $value = $args['attrValue']['alignment'];
            if (!empty($value)) {
                $style_declarations->add('justify-content', $value);
                return $style_declarations->value();
            }
        }

        return '';
    }


}
