<?php
/*
	Notification bar custom style
	
	Table of contents: (you can use search)
	# 1. Variables
	# 2. Panel content color
	# 3. View
*/


# 1. Variables

$notification_color = false;
$notification_bg = false;

# 2. Panel content color

$notification_color = StockieSettings::get( 'subscribe_popup_color', 'global' );
$notification_bg = StockieSettings::get( 'subscribe_popup_background', 'global' );

$content_color = '';
if ( $notification_color ) {
	$content_color = 'color:' . $notification_color . ';';
}

$content_bg_color = '';
if ( $notification_bg ) {
	$content_bg_color = 'background-color:' . $notification_bg . ';';
}


# 3. View

if ( $content_color ) {
	// --- start of CSS ---
	$_style_block  = '.notification-bar .notification-text{';
	$_style_block .= $content_color;
	$_style_block .= '}';
	// --- end of CSS ---
	StockieLayout::append_to_dynamic_css_buffer( $_style_block );
}

if ( $content_bg_color ) {
	// --- start of CSS ---
	$_style_block  = '.notification-bar {';
	$_style_block .= $content_bg_color;
	$_style_block .= '}';
	// --- end of CSS ---
	StockieLayout::append_to_dynamic_css_buffer( $_style_block );
}