{{:ModuleInclude('public/header')}}

{{if $is_not_bind_accounts eq 1}}
    {{:ModuleInclude('public/store_bind_accounts_tips')}}
{{else /}}
    {{:ModuleInclude('public/detail_nav_switch_tabs', [
        'nav_data' => [
            [
                'name' => MyLang('local_import_title'),
                'key'  => 'upload',
            ],
            [
                'name' => MyLang('plugins_market_title'),
                'key'  => 'market',
            ],
        ]
    ])}}
    <div class="detail-content-switch-data-item">
        <!-- 本地导入 -->
        <div class="item am-ht-auto am-active" data-key="upload">
            <form class="am-form form-validation am-form-popup-fixed am-upload-file" action="{{:MyUrl('admin/payment/upload')}}" method="POST" request-type="ajax-reload" request-value="parent" enctype="multipart/form-data">
                <div class="am-form-group am-flex-1">
                    <div class="am-form-file">
                        <button type="button" class="am-btn am-btn-default am-btn-xl am-radius"><i class="iconfont icon-upload-file"></i></button>
                        <input type="file" name="file" class="file-event" data-tips-tag="#form-upload-file-tips" data-validation-message="{{:MyLang('form_upload_file_message')}}" accept=".zip" multiple required />
                        <div id="form-upload-file-tips" class="am-margin-top-xs"></div>
                        {{if is_array(MyLang('payment.upload_top_list_tips'))}}
                            <div class="tips am-text-xs am-color-ccc am-margin-top-sm">
                                {{foreach :MyLang('payment.upload_top_list_tips') as $v}}
                                    <p>{{$v.name}}</p>
                                    {{if !empty($v['item']) and is_array($v['item'])}}
                                        <div class="am-margin-left-lg">
                                            {{foreach $v.item as $vs}}
                                                <p>{{$vs}}</p>
                                            {{/foreach}}
                                        </div>
                                    {{/if}}
                                {{/foreach}}
                                <p class="am-margin-top-xs am-text-danger">{{:MyLang('payment.upload_top_tips_ps')}}</p>
                            </div>
                        {{/if}}
                    </div>
                </div>
                <div class="am-form-popup-submit">
                    <button type="button" class="am-btn am-btn-warning am-radius am-btn-xs am-margin-right-lg" data-am-modal-close>
                        <i class="am-icon-paint-brush"></i>
                        <span>{{:MyLang('cancel_title')}}</span>
                    </button>
                    <button type="submit" class="am-btn am-btn-primary am-radius am-btn-xs btn-loading-example" data-am-loading="{spinner: 'circle-o-notch', loadingText:'{{:MyLang('confirm_title')}}'}">
                        <i class="am-icon-save"></i>
                        <span>{{:MyLang('confirm_title')}}</span>
                    </button>
                </div>
            </form>
        </div>
        <!-- 模板市场 -->
        <div class="item am-ht-auto" data-key="market">
            {{:ModuleInclude('public/market/index', [
                'type'                   => 'payment',
                'back_win_refresh_type'  => 'none',
                'search_url'             => MyUrl('admin/payment/market'),
                'more_download_url'      => empty($store_payment_url) ? '' : $store_payment_url,
                'more_download_name'     => MyLang('payment.base_nav_store_payment_name'),
            ])}}
        </div>
    </div>
{{/if}}

<!-- footer start -->
{{:ModuleInclude('public/footer')}}