<?php

namespace Database\Seeders;

use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;

class BukuTamuSeeder extends Seeder
{
    /**
     * Seed the buku_tamu table with data from SQL dump
     */
    public function run(): void
    {
        DB::statement('SET FOREIGN_KEY_CHECKS=0');

        // Execute each INSERT statement separately
        $statements = [
            base64_decode('SU5TRVJUIElOVE8gYGJ1a3VfdGFtdWAgKGBpZF90YW11YCwgYGlkX3VzZXJgLCBgbmFtYV90YW11YCwgYGVtYWlsYCwgYG5vX2hwYCwgYGFzYWxfaW5zdGFuc2lgLCBgc3RhdHVzYCwgYHRhbmdnYWxfa3VuanVuZ2FuYCwgYHR1anVhbl9rdW5qdW5nYW5gKSBWQUxVRVMKKDMsIDMsIE5VTEwsIE5VTEwsIE5VTEwsIE5VTEwsIE5VTEwsICcyMDI2LTAyLTE0JywgJ01lbWJhY2EgQnVrdScpLAooNCwgMywgTlVMTCwgTlVMTCwgTlVMTCwgTlVMTCwgTlVMTCwgJzIwMjYtMDItMTMnLCAnTWVtaW5qYW0gQnVrdScpLAooNSwgTlVMTCwgJ3dhcmRoYXR1bCBqYW5uYWggZmlxeWFuaScsIE5VTEwsIE5VTEwsICdwb2xpamUnLCBOVUxMLCAnMjAyNi0wMy0wMycsICdNZW1iYWNhJyksCig2LCBOVUxMLCAnd2FyZGhhdHVsIGphbm5haCBmaXF5YW5pJywgTlVMTCwgTlVMTCwgJ3BvbGl0ZWtuaWsgbmVnZXJpIGplbWJlcicsIE5VTEwsICcyMDI2LTAzLTA4JywgJ01lbWJhY2EnKSwKKDcsIE5VTEwsICd3YXJkaGF0dWwgamFubmFoIGZpcXlhbmknLCBOVUxMLCBOVUxMLCAncG9saXRla25payBuZWdlcmkgamVtYmVyJywgTlVMTCwgJzIwMjYtMDMtMDgnLCAnTWVtYmFjYScpLAooOCwgTlVMTCwgJ1dhcmRoYXR1bCBKYW5uYWggRmlxeWFuaScsICd3YXJkaGF0dWxqYW5uYWhmaXF5YW5pQGdtYWlsLmNvbScsICcwODc2NTQzMjQ1NicsICdwb2xpdGVrbmlrIG5lZ2VyaSBqZW1iZXInLCAnTWFoYXNpc3dhJywgJzIwMjYtMDMtMzAnLCAnTWVtYmFjYSAmIE1lbWluamFtJyksCig5LCBOVUxMLCAnbmF5eWlyYScsICduYXl5aXJhQGdtYWlsLmNvbScsICcwODc2NTQzMjQ1NicsICd1bml2ZXJzaXRhcyBqZW1iZXInLCAnTWFoYXNpc3dhJywgJzIwMjYtMDQtMDEnLCAnTWVtaW5qYW0nKSwKKDEwLCBOVUxMLCAnc3lhcmlmYWggYXVsaWEgcHV0cmknLCAncGlwZWhAZ21haWwuY29tJywgJzA4NTY0OTk1ODkzNicsICd1bm11aCcsICdNYWhhc2lzd2EnLCAnMjAyNi0wNC0wNycsICdNZW1pbmphbScpLAooMTEsIE5VTEwsICdTeWFyaWZhaCBBdWxpYSBQdXRyaScsICd3YXJkaGF0dWxqYW5uYWhmaXF5YW5pQGdtYWlsLmNvbScsICcwODU2NDk5NTg5MzYnLCAnUG9saXRla25payBOZWdlcmkgSmVtYmVyJywgJ01haGFzaXN3YScsICcyMDI2LTA0LTE0JywgJ01lbWJhY2EgJiBNZW1pbmphbScpLAooMTIsIE5VTEwsICdkZXdpIGx1dGZpYW50aScsICdwZXJwdXNrYWJqZW1iZXJAZ21haWwuY29tJywgJzA4MTIzMzI3NDYzMicsICdzbWtuIDggamVtYmVyJywgJ1Npc3dhJywgJzIwMjYtMDQtMTQnLCAnTWVtYmFjYScpLAooMTMsIE5VTEwsICdDYWNhJywgJ0NhY2FAZ21haWwuY29tJywgJzA4NTY0OTk1ODkzNicsICd1bmVzYScsICdHdXJ1L0Rvc2VuJywgJzIwMjYtMDQtMjknLCAnTWVtaW5qYW0nKSwKKDE0LCBOVUxMLCBOVUxMLCBOVUxMLCBOVUxMLCBOVUxMLCBOVUxMLCAnMjAyNi0wNC0yOScsICdNZW1iYWNhICYgTWVtaW5qYW0nKTs='),
        ];

        foreach ($statements as $sql) {
            DB::statement($sql);
        }

        DB::statement('SET FOREIGN_KEY_CHECKS=1');
    }
}
