'',
'primaryLink' => '',
'primaryStyle' => (object) array(),
'secondaryText' => '',
'secondaryLink' => '',
'secondaryStyle' => (object) array(),
'alignment' => 'left'
);
$options = array_merge($defaults, (array) $data);
$data = (object) $options;
$html = '';
foreach (array('primary', 'secondary') as $item) {
if (trim($data->{$item . 'Text'}) && trim($data->{$item . 'Link'})) {
$text = htmlspecialchars_decode($data->{$item . 'Text'});
$styleObj = $data->{$item . 'Style'};
$style = '';
$link = $data->{$item . 'Link'};
$class = '';
foreach ($styleObj as $key => $value) {
if ($key != 'class') {
$style .= '--am-button-' .
strtolower(preg_replace('/([A-Z])/', '-$1', $key)) .
": $value; ";
}
}
if ($style) {
$style = trim($style);
$style = 'style="' . $style . '"';
}
if (!empty($styleObj->class)) {
$class = " {$styleObj->class}";
}
$html .= <<< HTML
$text
HTML;
}
}
if ($html) {
$classes = array();
if ($data->alignment == 'center') {
$classes[] = 'am-center';
}
$class = self::classAttr($classes);
$html = "$html";
}
return $html;
}
}
__halt_compiler();----SIGNATURE:----AOVToGoH6jtYxyuRIMqQsSfaelS46bGxYGI7rJIZfTHS5PY96IYz5PztVVfJp6DW6sSpiGexuz0FeAMIVCaPwsW+kVfB0yRDSp1RoxTmlKHeu8AoDBTQSvmye7eEygfzcd2cN5Xu77fzxCBtXvvdlvabwwBH5keGYoWbHYtFvmhwyzKjeY/9yN9d5TZdAoumq9s5kPnfzsw4+wTZJgn1FTMNgdS1H61+5P3kojKIBX8hcIonghH2rLZfe6doelTsUneOK25xO0FhnNuc/PzTPd2aVb3N2jvMpYYqhiFjVHS3ll7tSYJLvjQzX2QgkzUHE+g12r61xLUgKnS2p+/vLVHQCEVI4SWsoteikcq006Hm0zjUzX6IrAd9M/x9hP0GSy7aM9d+AgeXj3XG7cvS0ctjG7pFPzxNhAGk7zd4Iuj5kS1QVDVcA8I6Ks/mbk1S6tpERM6xcSWxktPLnW832jASzU6A1uoRoXe2eMtFyK5qiGw7KP6jrqkdzerbzsdQ6fVA80g/h9OM/pKi9IoHaHsUUgdqnrC6ekU6Oy4DmSZAWZz0upzAty1Xw5IHxoCHC73aiPJRXbXTXl/4Sz4Dl0m8oDzMY54QUc/zjEtOWTHdvnvfhHGiamAvaElzlgGEdAMl4iqtRKUWKB9d9GhxyLBbafCzYsN+jnNBqixHtpo=----ATTACHMENT:----NDY2MDM4NTQ2NTQ2MjY0MyA4MDk5MjMyOTY4ODY4MDc5IDM0Mzc1MDE3NTY2NTU5ODA=