<?php
/**
  * Ahead WebSoft Technologies Pvt Ltd.
  * @copyright  Copyright 2006-2026 Ahead WebSoft Technologies Pvt Ltd.
  * @license    https://www.socialengine.com/policies
*/
?>
<?php echo $this->partial('_admin_breadcrumb.tpl', 'core', array('parentMenuItemName' => 'core_admin_main_plugins', 'childMenuItemName' => 'core_admin_main_settings_browserpush')); ?>

<h2 class="page_heading"><?php echo $this->translate("Web & Mobile Browser Push Notifications Plugin") ?></h2>
<?php $browserpush_widget = Zend_Registry::isRegistered('browserpush_widget') ? Zend_Registry::get('browserpush_widget') : null; ?>
<?php if (!Engine_Api::_()->getApi('settings', 'core')->getSetting('browserpush.serverkey', '') || !Engine_Api::_()->getApi('settings', 'core')->getSetting('browserpush.snippet', '')) { ?>
  <div class="alert alert-warning d-flex align-items-center gap-2"><i class="fa-solid fa-triangle-exclamation"></i><span><?php echo $this->translate("To start using this plugin and enable push notification, please configure and enter the Firebase API keys from <a href='admin/browserpush/settings/fb-settings'>here</a>."); ?></span></div>
<?php } ?>
<?php if ($browserpush_widget && is_countable($this->navigation) && engine_count($this->navigation)): ?>
  <div class='tabs'>
    <?php echo $this->navigation()->menu()->setContainer($this->navigation)->render() ?>
  </div>
<?php endif; ?>