import 'react-native-gesture-handler'; import * as React from 'react'; import { useState } from 'react'; import { Alert, Button, Image, StyleSheet, Dimensions, SafeAreaView, ScrollView, TouchableOpacity, Modal, Pressable, Share } from 'react-native'; import Constants from 'expo-constants'; import { Ionicons, FontAwesome } from '@expo/vector-icons'; import { LinearGradient } from 'expo-linear-gradient'; import { PolicyFooter, Social, ShowroomList, FooterInfo } from '../components/footer/footerMain'; import EditScreenInfo from '../components/EditScreenInfo'; import { Text, View, } from '../components/Themed'; import useColorScheme from '../hooks/useColorScheme'; import { TextInput } from 'react-native-gesture-handler'; import { RadioButton, Checkbox } from 'react-native-paper'; import { Picker } from '@react-native-picker/picker'; import { ArticleItem } from '../components/article/ArticleItem'; import Swiper from 'react-native-swiper'; import { ShowProductItem } from '../components/product/productItem'; export default function BuildPc() { return ( Trang chủ Build PC ) } const BuildPcBox = () => { return ( Xây dựng máy tính Chọn linh kiện xây dựng cấu hình Cấu hình 1 Cấu hình 2 Cấu hình 3 Cấu hình 4 Cấu hình 5 Làm mới Chi phí dự tính 30.000.000 đ Chi phí dự tính 30.000.000 đ Lưu cấu hình tải file excel cấu hình tải ảnh cấu hình chia sẻ cấu hình Xem & in Thêm vào giỏ hàng ) } const BuildPcListStore = () => { const [checked, setChecked] = React.useState('store1'); const listStore = [ { id: 1, name: '01: 131 Lê Thanh Nghị - Q. Hai Bà Trưng - Hà Nội' }, { id: 2, name: '02: 43 Thái Hà - Q. Đống Đa - Hà Nội' }, { id: 3, name: '03: A1-6 Lô 8A Lê Hồng Phong - Q. Ngô Quyền - Hải Phòng' }, { id: 4, name: '04: 79 Nguyễn Văn Huyên - Q. Cầu Giấy - Hà Nội' }, { id: 5, name: '05: 511 Quang Trung - Q. Hà Đông - Hà Nội' }, { id: 6, name: '06: 520 Cách Mạng Tháng 8 - Quận 3 - TP HCM' }, { id: 7, name: '07: 398 Nguyễn Văn Cừ - Q. Long Biên - Hà Nội' }, { id: 8, name: '08: 299 Minh Khai - Từ Sơn - Bắc Ninh' }, ] return ( setChecked('store0')} /> Tất cả kho { listStore.map(item => { const value = 'store' + item.id; return ( setChecked(value)} /> {item.name} ) }) } ) } const ListItemBuildPc = () => { const dataListItem = [ { id: 1, name: 'Bộ vi xử lý', }, { id: 2, name: 'Bo mạch chủ', }, { id: 3, name: 'RAM', }, { id: 4, name: 'HDD', }, { id: 5, name: 'SSD', }, { id: 6, name: 'VGA', }, { id: 7, name: 'Nguồn', }, { id: 8, name: 'Vỏ Case', }, { id: 9, name: 'Màn hình', }, { id: 10, name: 'Bàn phám, Chuột', }, { id: 11, name: 'Bàn phím', }, { id: 12, name: 'Chuột', }, { id: 13, name: 'Tai nghe', }, { id: 14, name: 'Loa', }, { id: 15, name: 'Ghế gamming', }, { id: 16, name: 'Quạt làm mát', }, { id: 17, name: 'Tản nhiệt nước All in One', }, { id: 18, name: 'Tản nhiệt nước custom', }, { id: 19, name: 'Tản nhiệt khí', }, { id: 20, name: 'Windows bản quyền', }, { id: 21, name: 'Phần mềm Antivirus', }, ]; const [modalVisible, setModalVisible] = useState(false); return ( { dataListItem.map((item, index) => { return ( {index + 1}. {item.name} setModalVisible(true)}> + ) }) } { setModalVisible(!modalVisible); }}> Chọn linh kiện setModalVisible(!modalVisible)}> ) } const SearchPopBuildPc = () => { return ( ) } const FilterPopBuildPc = () => { const [openFilter, setopenFilter] = useState(true); return ( setopenFilter(!openFilter)}> Lọc Lọc sản phẩm theo ) } const FinterBuildPcItem = () => { const [checkedFilter, setCheckedFilter] = useState(false); return ( Hãng sản xuất setCheckedFilter(!checkedFilter)} /> AMD (50) setCheckedFilter(!checkedFilter)} /> AMD (50) setCheckedFilter(!checkedFilter)} /> AMD (50) setCheckedFilter(!checkedFilter)} /> AMD (50) ); } const SortProBuildPc = () => { const [showSortProBuildPc, setshowSortProBuildPc] = useState(true); return ( Sắp Xếp setshowSortProBuildPc(!showSortProBuildPc)}> Tùy chọn Mới nhất Giá tăng dần ) } const WarehouseProBuildPc = () => { const [showSortProBuildPc, setshowSortProBuildPc] = useState(true); return ( Kho hàng setshowSortProBuildPc(!showSortProBuildPc)}> Tất cả 01: 131 Lê Thanh Nghị - Q. Hai Bà Trưng - Hà Nội 02: 43 Thái Hà - Q. Đống Đa - Hà Nội 03: A1-6 Lô 8A Lê Hồng Phong - Q. Ngô Quyền - Hải Phòng 04: 79 Nguyễn Văn Huyên - Q. Cầu Giấy - Hà Nội 05: 511 Quang Trung - Q. Hà Đông - Hà Nội 06: 520 Cách Mạng Tháng 8 - Quận 3 - TP HCM 07: 398 Nguyễn Văn Cừ - Q. Long Biên - Hà Nội 08: 299 Minh Khai - Từ Sơn - Bắc Ninh ) } const PagingProBuildPc = () => { return ( 1 2 3 4 5 6 7 ) } function formatCurrency(price: string | number) { let priceConvert = parseFloat(`${price}`).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1.").toString(); let len = priceConvert.length; return priceConvert.substring(0, len - 3); } const productData = [ { id: 1, productName: 'Laptop LG Gram 14ZD90N-V.AX55A5 (i5 1035G7/8GB RAM/512GBSSD/14.0 inch FHD/FP/Xám Bạc) (model 2020)', productSKU: 'TESTSKU', productImage: { small: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png', medium: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png', large: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png', original: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png', }, price: 30000000, marketPrice: 50000000, quantity: 1, warrantry: '36 Tháng', }, { id: 2, productName: 'Laptop LG Gram 14ZD90N-V.AX55A5 (i5 1035G7/8GB RAM/512GBSSD/14.0 inch FHD/FP/Xám Bạc) (model 2020)', productSKU: 'TESTSKU', productImage: { small: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png', medium: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png', large: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png', original: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png', }, price: 25000000, marketPrice: 50000000, quantity: 0, warrantry: '36 Tháng', }, { id: 3, productName: 'Laptop LG Gram 14ZD90N-V.AX55A5 (i5 1035G7/8GB RAM/512GBSSD/14.0 inch FHD/FP/Xám Bạc) (model 2020)', productSKU: 'TESTSKU', productImage: { small: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png', medium: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png', large: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png', original: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png', }, price: 35000000, marketPrice: 50000000, quantity: 1, warrantry: '36 Tháng', }, { id: 4, productName: 'Laptop LG Gram 14ZD90N-V.AX55A5 (i5 1035G7/8GB RAM/512GBSSD/14.0 inch FHD/FP/Xám Bạc) (model 2020)', productSKU: 'TESTSKU', productImage: { small: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png', medium: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png', large: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png', original: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png', }, price: 40000000, marketPrice: 50000000, quantity: 1, warrantry: '36 Tháng', }, { id: 5, productName: 'Laptop LG Gram 14ZD90N-V.AX55A5 (i5 1035G7/8GB RAM/512GBSSD/14.0 inch FHD/FP/Xám Bạc) (model 2020)', productSKU: 'TESTSKU', productImage: { small: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png', medium: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png', large: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png', original: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png', }, price: 30000000, marketPrice: 50000000, quantity: 1, warrantry: '36 Tháng', }, ] const ProductBuildPC = () => { return ( { productData.map((item, index) => { if (index < 5) { return ( {item.productName} Mã SP: {item.productSKU} Bảo hành: {item.warrantry} Kho hàng: { item.quantity == 0 ? Liên hệ : Còn hàng } {formatCurrency(item.price)} đ { item.quantity == 0 ? : } ) } }) } ) } const ProductOtherBuildPc = () => { const itemProductStyle = { width: '100%', flexDirection: 'column', } return ( Cấu hình tham khảo { productData.map(item => ) } Xem thêm 19 sản phẩm ) } const winWidth = Dimensions.get('window').width; //full width const winHeight = Dimensions.get('window').height; //full height const winWidthP10 = winWidth - 20; const halfWinWidth = winWidth / 2; const ratio = winWidthP10 / 850; //541 is actual image width const styles = StyleSheet.create({ container: { flex: 1, alignItems: 'center', justifyContent: 'center', backgroundColor: '#fff', }, brecrumb: { display: 'flex', width: winWidth, paddingLeft: 10, paddingRight: 10, flexDirection: 'row', height: 18, alignItems: 'center', marginTop: 10, marginBottom: 10, }, brecrumbText: { fontSize: 13, color: '#222', }, brecrumbTextLast: { fontSize: 13, color: '#b7b7b7', }, brecrumbIcon: { fontSize: 13, color: '#222', marginLeft: 6, marginRight: 6 }, boxBuildPc: { paddingHorizontal: 10, width: winWidth, marginBottom: 30, }, boxBuildPcTitle: { width: '100%', marginBottom: 20, fontSize: 22, fontWeight: 'bold', textTransform: 'uppercase', textAlign: 'center', color: '#ed1b24', }, boxBuildPcBanner: { marginBottom: 20, width: '100%', height: 72, position: 'relative', }, boxBuildPcBannerImg: { width: '100%', position: 'absolute', top: 0, left: 0, bottom: 0, right: 0, }, boxBuildPcNote: { marginBottom: 20, textAlign: 'center', color: '#2d3877', fontSize: 15, fontWeight: 'bold', }, listConfig: { flexDirection: 'row', marginBottom: 20, flexWrap: 'wrap', justifyContent: 'space-between', alignItems: 'center', paddingBottom: 20, borderBottomColor: '#e1e1e1', borderBottomWidth: 1, }, listConfigItem: { width: '48%', marginBottom: 10, flexDirection: 'row', height: 40, justifyContent: 'center', alignItems: 'center', backgroundColor: '#d9d9d9', borderRadius: 3, }, listConfigItemText: { color: '#333', textTransform: 'uppercase' }, listConfigItemActive: { backgroundColor: '#2d3877', }, listConfigItemTextActive: { color: '#fff', }, boxBuildPcReload: { width: 126, height: 40, flexDirection: 'row', justifyContent: 'center', alignItems: 'center', borderRadius: 3, backgroundColor: '#2d3877', marginBottom: 20, }, boxBuildPcReloadText: { color: '#fff', textTransform: 'uppercase', marginRight: 10, }, boxBuildPcReloadIcon: { color: '#fff', }, boxBuildPcTotalPrice: { textAlign: 'right' }, boxBuildPcTotalPriceNum: { fontWeight: 'bold', color: 'red' }, boxStore: { marginBottom: 20, paddingBottom: 20, borderBottomWidth: 1, borderBottomColor: '#e1e1e1' }, boxStoreItem: { marginBottom: 10, flexDirection: 'row', alignItems: 'center', justifyContent: 'flex-start', }, boxStoreItemCheck: { width: 36, height: 36, borderRadius: 18, borderWidth: 1, borderColor: '#666', marginRight: 10, }, boxStoreItemText: { width: winWidthP10 - 46, }, itemBuildPCList: {}, itemBuildPC: { marginBottom: 10, paddingBottom: 10, flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', borderBottomWidth: 1, borderBottomColor: '#e1e1e1' }, itemBuildPCText: {}, itemBuildPCShowPop: { width: 50, height: 40, justifyContent: 'center', alignItems: 'center', borderRadius: 3, backgroundColor: '#243a76', }, itemBuildPCShowPopText: { fontWeight: 'bold', fontSize: 36, color: '#fff', lineHeight: 36, }, itemBuildPCPop: { flex: 1, position: 'relative', paddingTop: 25, backgroundColor: '#243a76', }, itemBuildPCPopClose: { width: 30, height: 30, borderWidth: 1, justifyContent: 'center', flexDirection: 'row', alignItems: 'center', borderColor: '#fff' }, itemBuildPCPopCloseIcon: { color: '#fff' }, boxPrductBuildPc: { width: winWidth, paddingHorizontal: 10, marginBottom: 20, }, boxPrductBuildPcList: {}, boxPrductBuildPcItem: { flexDirection: 'row', marginBottom: 15, alignItems: 'center', paddingBottom: 15, borderBottomWidth: 1, borderBottomColor: '#e1e1e1' }, boxPrductBuildPcImg: { width: 60, height: 60, position: 'relative', overflow: 'hidden', marginRight: 10, }, boxPrductBuildPcImgCt: { position: 'absolute', top: 0, left: 0, bottom: 0, right: 0, }, boxPrductBuildPcInfo: { width: winWidthP10 - 130, paddingRight: 10, }, boxPrductBuildPcName: { marginBottom: 10, }, boxPrductBuildPcOtherText: { marginBottom: 10, flexDirection: 'row', }, boxPrductBuildPcOtherTextSt: { fontSize: 12, width: 80, }, boxPrductBuildPcOtherTextNd: { fontSize: 12, }, boxPrductBuildPcPrice: { fontSize: 19, fontWeight: 'bold', color: '#f40606', marginBottom: 7, }, boxPrductBuildPcOldPrice: { color: '#888', textDecorationLine: 'line-through', }, boxPrductBuildPcQuantity: { width: 80, }, boxPrductBuildPcQuantityNo: { flexDirection: 'row', alignItems: 'center', paddingHorizontal: 10, height: 20, backgroundColor: '#eaeaea', borderRadius: 3, }, boxPrductBuildPcQuantityNoIcon: { marginRight: 5, }, boxPrductBuildPcQuantityNoText: {}, boxPrductBuildPcQuantityHas: { flexDirection: 'row', alignItems: 'center', paddingHorizontal: 10, height: 20, backgroundColor: '#278c56', borderRadius: 3, }, boxPrductBuildPcQuantityHasIcon: { marginRight: 5, color: '#fff', }, boxPrductBuildPcQuantityHasText: { color: '#fff' }, boxPrductBuildPcSelec: { }, boxPrductBuildPcSelecNo: { width: 50, height: 40, justifyContent: 'center', alignItems: 'center', borderRadius: 3, backgroundColor: '#ec1b23', }, boxPrductBuildPcSelecYes: { width: 50, height: 40, justifyContent: 'center', alignItems: 'center', borderRadius: 3, backgroundColor: '#243a76', }, boxPrductBuildPcSelecIcon: { fontWeight: 'bold', fontSize: 36, color: '#fff', lineHeight: 36, }, headerPopBuildPC: { width: winWidth, flexDirection: 'column', zIndex: 9, }, headerPopBuildPCContentSt: { flexDirection: 'row', justifyContent: 'space-between', width: '100%', backgroundColor: '#243a76', height: 40, alignItems: 'center', paddingHorizontal: 10, }, headerPopBuildPCTitle: { fontSize: 20, fontWeight: 'bold', color: '#fff' }, headerPopBuildPCContentNd: { flexDirection: 'row', justifyContent: 'space-between', width: winWidth, backgroundColor: '#243a76', padding: 10, zIndex: 9, }, headerPopBuildPCSearch: { width: winWidthP10 - 60, backgroundColor: '#fff', position: 'relative', borderRadius: 3, overflow: 'hidden', }, headerPopBuildPCSearchInput: { width: '100%', height: 40, paddingHorizontal: 10, paddingRight: 40, }, headerPopBuildPCSearchButton: { width: 40, height: 40, position: 'absolute', right: 0, top: 0, flexDirection: 'row', justifyContent: 'center', alignItems: 'center' }, headerPopBuildPCSearchIcon: { fontSize: 18, color: '#ec1b23' }, headerPopBuildPCContentFilter: { width: 60, height: 40, position: 'relative', backgroundColor: 'rgba(0,0,0,0)' }, headerPopBuildPCFilter: { width: '100%', height: 40, flexDirection: 'row', justifyContent: 'flex-end', alignItems: 'center', zIndex: 9, }, headerPopBuildPCFinterIcon: { fontSize: 16, color: '#fff', marginRight: 5, }, headerPopBuildPCFinterText: { fontSize: 16, color: '#fff' }, headerPopBuildPCContentFilterShowHide: { width: winWidth, position: 'absolute', top: 50, right: -10, padding: 10, backgroundColor: '#fff', zIndex: 9, display: 'none', }, headerPopBuildPCContentFilterShow: { width: winWidth, position: 'absolute', top: 50, right: -10, padding: 10, backgroundColor: '#fff', zIndex: 9, }, headerPopBuildPCContentFilterTitle: { fontSize: 16, fontWeight: 'bold', color: '#243a76', lineHeight: 32, }, headerPopBuildPCContentFilterBox: { paddingVertical: 10, borderTopColor: '#e1e1e1', borderTopWidth: 1, }, headerPopBuildPCContentFilterName: { fontSize: 16, fontWeight: 'bold', marginBottom: 10, }, headerPopBuildPCContentFilterList: { width: '100%', flexDirection: 'row', justifyContent: 'space-between', flexWrap: 'wrap', alignItems: 'center', }, headerPopBuildPCContentFilterItem: { width: '100%', flexDirection: 'row', marginBottom: 10, alignItems: 'center' }, headerPopBuildPCContentFilterCheck: { width: 35, height: 35, borderWidth: 1, borderColor: '#999', marginRight: 10, position: 'relative', }, headerPopBuildPCContentFilterText: {}, headerPopBuildPCContentRd: { flexDirection: 'column', width: winWidth, padding: 10, borderBottomColor: '#f7f7f7', borderBottomWidth: 1, }, headerPopBuildPCContentRdTop: { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', marginBottom: 10, position: 'relative', zIndex: 8, }, headerPopBuildPCContentSelect: { flexDirection: 'row', alignItems: 'center', width: '49%', position: 'relative', zIndex: 9, }, headerPopBuildPCContentSelectTite: { marginRight: 10, fontWeight: 'bold', width: 65, }, headerPopBuildPCContentSelectBox: { paddingHorizontal: 10, height: 32, flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', borderWidth: 1, borderColor: '#e1e1e1', borderRadius: 3, }, headerPopBuildPCContentSelectBoxText: { marginRight: 10, }, headerPopBuildPCContentSelectBoxIcon: {}, headerPopBuildPCContentSelectList: { position: 'absolute', width: winWidthP10, top: 35, padding: 10, shadowColor: "#000", shadowOffset: { width: 0, height: 1, }, shadowOpacity: 0.22, shadowRadius: 2.22, elevation: 3, display: 'none', }, active: { display: 'flex', }, poRight: { right: 0, }, poLeft: { left: 0, }, headerPopBuildPCContentSelectItem: { marginBottom: 10, }, pagingBuildPc: { width: '100%', flexDirection: 'row', alignItems: 'center', flexWrap: 'wrap', }, pagingBuildPcItem: { width: 28, height: 28, borderRadius: 3, backgroundColor: '#243a76', marginHorizontal: 2, color: '#fff', flexDirection: 'row', justifyContent: 'center', alignItems: 'center', borderColor: '#243a76', borderWidth: 1, }, pagingBuildPcItemActive: { backgroundColor: '#fff', }, pagingBuildPcText: { color: '#fff', fontWeight: 'bold', }, pagingBuildPcTextActive: { color: '#ec0000', fontWeight: 'bold', }, buttonBuildPcFt: { width: '100%', marginTop: 10, height: 40, flexDirection: 'row', justifyContent: 'center', alignItems: 'center', backgroundColor: '#2d3877', borderRadius: 3, }, buttonBuildPcFtText: { fontSize: 14, textTransform: 'uppercase', color: '#fff', marginRight: 10, fontWeight: 'bold', }, buttonBuildPcFtIcon: { fontSize: 14, color: '#fff', }, sliderSwipper: { flexDirection: 'row', height: 500, }, ProductOtherBuildPc: { marginVertical: 20, paddingHorizontal: 10, borderTopWidth: 1, borderTopColor: '#e1e1e1' }, ProductOtherBuildPcTitle: { width: '100%', paddingVertical: 10, fontWeight: 'bold', fontSize: 24, textTransform: 'uppercase', color: '#2d3877', textAlign: 'center' }, ProductOtherBuildPcList: { width: '100%', }, ProductOtherBuildPcButton: { width: '100%', height: 40, flexDirection: 'row', justifyContent: 'center', alignItems: 'center', borderRadius: 3, backgroundColor: '#2d3877' }, ProductOtherBuildPcButtonText: { color: '#fff', marginRight: 10, }, ProductOtherBuildPcButtonIcon: { color: '#fff' }, })