package com.bytedance.android.livesdk.i18n.db;

import X.0BT;
import X.0BV;
import X.0BW;
import X.0BY;
import X.0Fe;
import X.0Fh;
import X.0Fk;
import X.0Fo;
import X.0Fw;
import X.0G9;
import X.0GA;
import X.1DC;
import X.C1455RiN;
import X.C1458RiQ;
import X.C1495Rj1;
import X.C1498Rj4;
import com.bytedance.covode.number.Covode;
import com.bytedance.frameworks.apm.trace.MethodCollector;
import java.util.HashMap;
import java.util.HashSet;

public final class I18nDatabase_Impl extends I18nDatabase {
    public volatile C1498Rj4 LJIIJ;
    public volatile C1495Rj1 LJIIJJI;

    static {
        Covode.recordClassIndex(16862);
    }

    public final 0Fw LIZ() {
        return new 0Fw(this, new HashMap(0), new HashMap(0), new String[]{"translation", "information"});
    }

    public final C1498Rj4 LJIIIIZZ() {
        C1498Rj4 rj4;
        MethodCollector.i(6742);
        if (this.LJIIJ != null) {
            C1498Rj4 rj42 = this.LJIIJ;
            MethodCollector.o(6742);
            return rj42;
        }
        synchronized (this) {
            try {
                if (this.LJIIJ == null) {
                    this.LJIIJ = new C1455RiN(this);
                }
                rj4 = this.LJIIJ;
            } finally {
                MethodCollector.o(6742);
            }
        }
        return rj4;
    }

    public final C1495Rj1 LJIIIZ() {
        C1495Rj1 rj1;
        MethodCollector.i(6944);
        if (this.LJIIJJI != null) {
            C1495Rj1 rj12 = this.LJIIJJI;
            MethodCollector.o(6944);
            return rj12;
        }
        synchronized (this) {
            try {
                if (this.LJIIJJI == null) {
                    this.LJIIJJI = new C1458RiQ(this);
                }
                rj1 = this.LJIIJJI;
            } finally {
                MethodCollector.o(6944);
            }
        }
        return rj1;
    }

    public final 0BY LIZIZ(0Fe r5) {
        1DC r3 = new 1DC(r5, new 0G9() {
            static {
                Covode.recordClassIndex(16863);
            }

            public final void LIZ() {
                if (I18nDatabase_Impl.this.LJI != null) {
                    int size = I18nDatabase_Impl.this.LJI.size();
                    for (int i = 0; i < size; i++) {
                        I18nDatabase_Impl.this.LJI.get(i);
                    }
                }
            }

            public final void LJFF(0BT r1) {
                0Fh.LIZ(r1);
            }

            public final void LIZIZ(0BT r2) {
                r2.LIZJ("CREATE TABLE IF NOT EXISTS `translation` (`key` TEXT NOT NULL, `value` TEXT, PRIMARY KEY(`key`))");
                r2.LIZJ("CREATE TABLE IF NOT EXISTS `information` (`key` TEXT NOT NULL, `value` TEXT, PRIMARY KEY(`key`))");
                r2.LIZJ("CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)");
                r2.LIZJ("INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'db08c04e8a10c6c1ddb9d9ab384c2f17')");
            }

            public final void LIZ(0BT r4) {
                r4.LIZJ("DROP TABLE IF EXISTS `translation`");
                r4.LIZJ("DROP TABLE IF EXISTS `information`");
                if (I18nDatabase_Impl.this.LJI != null) {
                    int size = I18nDatabase_Impl.this.LJI.size();
                    for (int i = 0; i < size; i++) {
                        I18nDatabase_Impl.this.LJI.get(i);
                    }
                }
            }

            public final void LIZJ(0BT r4) {
                I18nDatabase_Impl.this.LIZ = r4;
                I18nDatabase_Impl.this.LIZ(r4);
                if (I18nDatabase_Impl.this.LJI != null) {
                    int size = I18nDatabase_Impl.this.LJI.size();
                    for (int i = 0; i < size; i++) {
                        I18nDatabase_Impl.this.LJI.get(i);
                    }
                }
            }

            public final 0GA LJ(0BT r14) {
                HashMap hashMap = new HashMap(2);
                hashMap.put("key", new 0Fk("key", "TEXT", true, 1, (String) null, 1));
                hashMap.put("value", new 0Fk("value", "TEXT", false, 0, (String) null, 1));
                0Fo r7 = new 0Fo("translation", hashMap, new HashSet(0), new HashSet(0));
                0Fo LIZ = 0Fo.LIZ(r14, "translation");
                if (!r7.equals(LIZ)) {
                    return new 0GA(false, "translation(com.bytedance.android.livesdk.i18n.db.I18nTranslation).\n Expected:\n" + r7 + "\n Found:\n" + LIZ);
                }
                HashMap hashMap2 = new HashMap(2);
                hashMap2.put("key", new 0Fk("key", "TEXT", true, 1, (String) null, 1));
                hashMap2.put("value", new 0Fk("value", "TEXT", false, 0, (String) null, 1));
                0Fo r6 = new 0Fo("information", hashMap2, new HashSet(0), new HashSet(0));
                0Fo LIZ2 = 0Fo.LIZ(r14, "information");
                if (r6.equals(LIZ2)) {
                    return new 0GA(true, (String) null);
                }
                return new 0GA(false, "information(com.bytedance.android.livesdk.i18n.db.I18nInformation).\n Expected:\n" + r6 + "\n Found:\n" + LIZ2);
            }
        }, "db08c04e8a10c6c1ddb9d9ab384c2f17", "e3af7f9b450df7204a5f65d0fd2a1eaa");
        0BV LIZ = 0BW.LIZ(r5.LIZIZ);
        LIZ.LIZIZ = r5.LIZJ;
        LIZ.LIZJ = r3;
        return r5.LIZ.LIZ(LIZ.LIZ());
    }
}
