<div class="webone-sms-container">
    <div style="display: flex; justify-content: space-between; align-items: center;">
        <div style="display: flex; align-items: center;">
            <img src="<?php echo WEBONE_SMS_PLUGIN_URL . 'assets/admin/images/smsone-logo-2.png' ?>" alt="" style="width: 120px; padding-bottom: 10px;" />

            <h2 style="font-size: 1.5em !important;">
                افزونه پیامک SMSOne
            </h2>

            <small style="margin-right: 2px;">
                نسخه
                <?php echo WEBONE_SMS_PLUGIN_VERSION; ?>
            </small>
        </div>
        <div>
            <?php if ($plugin_is_active): ?>
                <h2>
                    مانده اعتبار:
                    <span id="span-credit"><?php echo number_format($layout_data['credit']); ?></span>
                    ریال

                    <button type="button" id="btn-refresh-credit" title="refresh" style="border: 0; cursor: pointer; color: blue; background-color: transparent;">
                        <span class="dashicons dashicons-image-rotate"></span>
                        <!-- <span class="spinner is-active" style="margin: 0px;"></span> -->
                    </button>
                </h2>
            <?php else: ?>
                <a href="<?php echo add_query_arg(['page' => 'webone-sms-settings']); ?>"
                   class="button button-primary button-hero" style="float: left;"
                >فعالسازی</a>
            <?php endif; ?>
        </div>
    </div>

    <hr style="width: 100%;" />

    <div>
        <ul class="webone-sms-breadcrumb">
            <?php
            $items = [
                [
                    'title' => 'پیامک وب‌وان',
                    'page'  => 'webone-sms'
                ]
            ];
            $items = apply_filters('webone_sms_breadcrumb_items', $items);
            foreach($items as $item):
            ?>
            <li>
                <?php if (isset($item['current']) && $item['current']): ?>
                <?php echo $item['title']; ?>
                <?php else: ?>
                <a href="<?php echo add_query_arg(['page' => $item['page'], 'plugin' => null, 'tab' => null]); ?>">
                    <?php echo $item['title']; ?>
                </a>
                <?php endif; ?>
            </li>
            <?php endforeach; ?>
        </ul>
    </div>

    <div>
        <?php include_once $view_file; ?>
    </div>
</div>