import AppText from 'components/AppText';
import LayoutTwo from 'components/LayoutTwo';
import * as React from 'react';
import { useTranslation } from 'react-i18next';
import { ScrollView, StyleSheet, View } from 'react-native';
import Battery from 'svg/Battery';
import Blade from 'svg/Blade';
import Book from 'svg/Book';
import Dron from 'svg/Dron';
import Drug from 'svg/Drug';
import Food from 'svg/Food';
import Glass from 'svg/Glass';
import Jewelry from 'svg/Jewelry';
import Pencil from 'svg/Pencil';
import WaterGlass from 'svg/WaterGlass';
import Tabs from '../../home/ui/Tabs';

interface RestrictedProductProps {}

const RestrictedProduct = (props: RestrictedProductProps) => {
  const [activeTab, setActiveTab] = React.useState<'AVIA' | 'AUTO'>('AVIA');
  const { t } = useTranslation();
  return (
    <LayoutTwo title={t('Taqiqlangan buyumlar')}>
      <ScrollView style={{ flex: 1 }}>
        <View style={styles.container}>
          <Tabs activeTab={activeTab} setActiveTab={setActiveTab} />
          {activeTab === 'AVIA' && (
            <View style={{ marginTop: 10, gap: 10, marginBottom: 20 }}>
              <AppText
                style={{
                  width: '95%',
                  margin: 'auto',
                  fontSize: 20,
                  fontWeight: '500',
                }}
              >
                {t('Aviada taqiqlangan buyumlar')}
              </AppText>
              <View style={styles.cardWhite}>
                <View style={styles.priceCard}>
                  <AppText style={styles.titleBlack}>
                    <WaterGlass />
                  </AppText>
                  <AppText style={[styles.titleBlack, { fontSize: 16 }]}>
                    {t('Ichida suyuqligi bor narsalar')}
                  </AppText>
                </View>
              </View>
              <View style={styles.cardWhite}>
                <View style={styles.priceCard}>
                  <AppText style={styles.titleBlack}>
                    <Battery />
                  </AppText>
                  <View style={{ width: '90%' }}>
                    <AppText style={[styles.titleBlack, { fontSize: 16 }]}>
                      {t('Batareykasi va magnit bo’lgan istalgan narsa')}
                    </AppText>
                    <AppText style={styles.desc}>
                      {t(
                        '(Telifon, sensitive buyumlar, airpods, naushnik, qo’l soati, tagi yonadigan krasovkalar...)',
                      )}
                    </AppText>
                  </View>
                </View>
              </View>
              <View style={styles.cardWhite}>
                <View style={styles.priceCard}>
                  <AppText style={styles.titleBlack}>
                    <Pencil />
                  </AppText>
                  <View style={{ width: '90%' }}>
                    <AppText style={[styles.titleBlack, { fontSize: 16 }]}>
                      {t('Kukunli buyumlar')}
                    </AppText>
                    <AppText style={styles.desc}>
                      {t('(Pudra, ten...)')}
                    </AppText>
                  </View>
                </View>
              </View>
              <View style={styles.cardWhite}>
                <View style={styles.priceCard}>
                  <AppText style={styles.titleBlack}>
                    <Glass />
                  </AppText>
                  <View style={{ width: '90%' }}>
                    <AppText style={[styles.titleBlack, { fontSize: 16 }]}>
                      {t('Parfumeriya')}
                    </AppText>
                    <AppText style={styles.desc}>
                      {t(
                        '(Barcha Parfumeriya va kosmetika, yuvinish maxsulotlari)',
                      )}
                    </AppText>
                  </View>
                </View>
              </View>
              <View style={styles.cardWhite}>
                <View style={styles.priceCard}>
                  <AppText style={styles.titleBlack}>
                    <Blade />
                  </AppText>
                  <View style={{ width: '90%' }}>
                    <AppText style={[styles.titleBlack, { fontSize: 16 }]}>
                      {t('O’tkir tig’li va sovuq qirollar')}
                    </AppText>
                    <AppText style={styles.desc}>
                      {t('(Pichoq, qaychi, miltiq...)')}
                    </AppText>
                  </View>
                </View>
              </View>
              <View style={styles.cardWhite}>
                <View style={styles.priceCard}>
                  <AppText style={styles.titleBlack}>
                    <Jewelry />
                  </AppText>
                  <View style={{ width: '90%' }}>
                    <AppText style={[styles.titleBlack, { fontSize: 16 }]}>
                      {t('Zargarklik buyumlari')}
                    </AppText>
                    <AppText style={styles.desc}>
                      {t('(Tilla, kumush, olmos, braslit...)')}
                    </AppText>
                  </View>
                </View>
              </View>
              <View style={styles.cardWhite}>
                <View style={styles.priceCard}>
                  <AppText style={styles.titleBlack}>
                    <Drug />
                  </AppText>
                  <View style={{ width: '90%' }}>
                    <AppText style={[styles.titleBlack, { fontSize: 16 }]}>
                      {t('Dori darmon va med texnika')}
                    </AppText>
                  </View>
                </View>
              </View>
              <View style={styles.cardWhite}>
                <View style={styles.priceCard}>
                  <AppText style={styles.titleBlack}>
                    <Food />
                  </AppText>
                  <View style={{ width: '90%' }}>
                    <AppText style={[styles.titleBlack, { fontSize: 16 }]}>
                      {t('Oziq ovqat')}
                    </AppText>
                  </View>
                </View>
              </View>
              <View style={[styles.card]}>
                <AppText style={[styles.titleBlack, { color: '#000000B2' }]}>
                  {t(
                    "Agar sizda g'ayrioddiy yoki noaniq mahsulot bo'lsa, albatta buyurtma qilishdan oldin so'rashingiz tavsiya etiladi.",
                  )}
                </AppText>
              </View>
              <View style={[styles.card]}>
                <AppText style={[styles.titleBlack, { color: '#FF6363' }]}>
                  {t('Muhim!')}
                </AppText>
              </View>
              <View style={[styles.card]}>
                <AppText style={[styles.titleBlack, { color: '#000000B2' }]}>
                  {t(
                    "Avia pochta manzili orqali yuborilishi taqiqlangan mahsulot buyurtma qilgan bo'lsangiz, u avtomatik ravishda avtokargo yukiga (avto) o'tkaziladi. Shunday qilib, yukingiz Xitoy omborida qolib ketmaydi.",
                  )}
                </AppText>
              </View>
              <View style={[styles.cardWhite, { backgroundColor: '#DFF2FD' }]}>
                <AppText style={[styles.desc, { color: '#28A7E8B2' }]}>
                  {t(
                    `Shu bilan birga, Aviada ham, Avtoda ham taqiqlangan mahsulot yuborilgan bo'lsa bunday holatda mahsulot O'zbekistonga yuborilmaydi va bu uchun javobgarlik mijozga yuklanadi.`,
                  )}
                </AppText>
              </View>
            </View>
          )}
          {activeTab === 'AUTO' && (
            <View style={{ marginTop: 10, gap: 10, marginBottom: 20 }}>
              <View style={styles.cardWhite}>
                <View style={styles.priceCard}>
                  <AppText style={styles.titleBlack}>
                    <Jewelry />
                  </AppText>
                  <View style={{ width: '90%' }}>
                    <AppText style={[styles.titleBlack, { fontSize: 16 }]}>
                      {t('Zargarklik buyumlari')}
                    </AppText>
                    <AppText style={styles.desc}>
                      {t('(Tilla, kumush, olmos, braslit...)')}
                    </AppText>
                  </View>
                </View>
              </View>
              <View style={styles.cardWhite}>
                <View style={styles.priceCard}>
                  <AppText style={styles.titleBlack}>
                    <Drug />
                  </AppText>
                  <View style={{ width: '90%' }}>
                    <AppText style={[styles.titleBlack, { fontSize: 16 }]}>
                      {t('Dori darmon va med texnika')}
                    </AppText>
                  </View>
                </View>
              </View>
              <View style={styles.cardWhite}>
                <View style={styles.priceCard}>
                  <AppText style={styles.titleBlack}>
                    <Food />
                  </AppText>
                  <View style={{ width: '90%' }}>
                    <AppText style={[styles.titleBlack, { fontSize: 16 }]}>
                      {t('Oziq ovqat')}
                    </AppText>
                  </View>
                </View>
              </View>
              <View style={styles.cardWhite}>
                <View style={styles.priceCard}>
                  <AppText style={styles.titleBlack}>
                    <Book />
                  </AppText>
                  <View style={{ width: '90%' }}>
                    <AppText style={[styles.titleBlack, { fontSize: 16 }]}>
                      {t('Diniy kitob va diniy buyumlar')}
                    </AppText>
                  </View>
                </View>
              </View>
              <View style={styles.cardWhite}>
                <View style={styles.priceCard}>
                  <AppText style={styles.titleBlack}>
                    <Dron />
                  </AppText>
                  <View style={{ width: '90%' }}>
                    <AppText style={[styles.titleBlack, { fontSize: 16 }]}>
                      {t('Dron, avtomat qurollar')}
                    </AppText>
                  </View>
                </View>
              </View>
              <View style={[styles.card]}>
                <AppText style={[styles.titleBlack, { color: '#000000B2' }]}>
                  {t(
                    "Agar sizda g'ayrioddiy yoki noaniq mahsulot bo'lsa, albatta buyurtma qilishdan oldin so'rashingiz tavsiya etiladi.",
                  )}
                </AppText>
              </View>
              <View style={[styles.card]}>
                <AppText style={[styles.titleBlack, { color: '#FF6363' }]}>
                  {t('Muhim!')}
                </AppText>
              </View>
              <View style={[styles.card]}>
                <AppText style={[styles.titleBlack, { color: '#000000B2' }]}>
                  {t(
                    "Avia pochta manzili orqali yuborilishi taqiqlangan mahsulot buyurtma qilgan bo'lsangiz, u avtomatik ravishda avtokargo yukiga (avto) o'tkaziladi. Shunday qilib, yukingiz Xitoy omborida qolib ketmaydi.",
                  )}
                </AppText>
              </View>
              <View style={[styles.cardWhite, { backgroundColor: '#DFF2FD' }]}>
                <AppText style={[styles.desc, { color: '#28A7E8B2' }]}>
                  {t(
                    "Shu bilan birga, Aviada ham, Avtoda ham taqiqlangan mahsulot yuborilgan bo'lsa bunday holatda mahsulot O'zbekistonga yuborilmaydi va bu uchun javobgarlik mijozga yuklanadi.",
                  )}
                </AppText>
              </View>
            </View>
          )}
        </View>
      </ScrollView>
    </LayoutTwo>
  );
};

export default RestrictedProduct;

const styles = StyleSheet.create({
  container: {
    marginTop: 10,
  },
  card: {
    width: '95%',
    gap: 5,
    margin: 'auto',
  },
  cardWhite: {
    backgroundColor: '#FFFFFF',
    width: '95%',
    gap: 5,
    margin: 'auto',
    borderRadius: 8,
    paddingVertical: 15,
    paddingHorizontal: 12,
    shadowColor: '#000',
    shadowOffset: { width: 0, height: 1 },
    shadowOpacity: 0.1,
    shadowRadius: 2,

    elevation: 1,
  },
  titleBlack: {
    fontSize: 16,
    fontWeight: '500',
  },
  desc: {
    color: '#000000B2',
    fontSize: 14,
    fontWeight: '400',
  },
  priceCard: {
    flexDirection: 'row',
    gap: 10,
    alignItems: 'flex-start',
  },
});
