<?php
    use Illuminate\Support\Facades\Auth;
        $ad_conf = [
            ['code' => 0, 'name' => ''],
            ['code' => 1, 'name' => '未'],
            ['code' => 2, 'name' => '可'],
            ['code' => 3, 'name' => '不可'],
        ];
        $user = Auth::User();
?>


<?php $__env->startSection('contents'); ?>

    <div class="mt5">
        <?php echo $__env->make('admin.objects.components.hp-tab', ['title' => 'HP管理ー店舗情報', 'type' => 'store'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
        <?php echo $__env->make('admin.objects.components.regist-band', ['title' => '店舗情報一覧'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>

        <div class="store_list">
            <div class="d-flex justify-content-end">
                <?php if($user->company_id == 1): ?>
                    <a href="<?php echo e(route('store-regist')); ?>" class="btn_imagesave w120 store_new_btn">新規登録</a>
                <?php endif; ?>
            </div>
            <table>
                <tr>
                    <th class="w150">写真画像</th>
                    <th class="w150">店舗ID</th>
                    <th class="w200">店舗名</th>
                    <th class="w300">住所</th>
                    <th class="w125">公開</th>
                    <th class=""></th>
                </tr>
                <?php $__currentLoopData = $store; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                        <td>
                            <?php if(!empty($item->file_path)): ?>
                                <img src="<?php echo e($item->file_path); ?>" width="150" />
                            <?php else: ?>
                                <img src="<?php echo e(root('img/noimage2.jpg')); ?>" width="150" />
                            <?php endif; ?>

                        </td>
                        <td><?php echo e($item->code); ?></td>
                        <td><?php echo e($item->name); ?></td>
                        <td>
                            <?php echo e($item->address_info); ?>

                        </td>
                        <td class="text-center"><?php echo $__env->make('admin.objects.components.switch-disp', ['name' => 'store_disp', 'checked' => $item->disp], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?></td>
                        <td>
                            <?php echo $__env->make('admin.objects.components.hidden', ['name' => 'store_id', 'value' => $item->id], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                            <?php echo $__env->make('admin.objects.components.link-btn-nostyle', ['url' => route('store-edit', ['id' => $item->code]), 'title' => '編集', 'class' => 'edit_store_btn'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                            <?php if($user->company_id == 1): ?>
                                <?php echo $__env->make('admin.objects.components.link-btn-nostyle', ['url' => 'javascript:void(0);', 'title' => '削除', 'class' => 'del_store_btn', 'name' => 'store_delete'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                            <?php endif; ?>
                        </td>
                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </table>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.base', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>