-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathmain.py
45 lines (34 loc) · 1.26 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Importing Libraries
import streamlit as st
from components.utils import init
from components.drop_dates import DropDatesUI
from components.categories import CategoriesUI
from components.item import ItemUI
from components.basket import BasketUI
from components.checkout import CheckoutUI
from components.buy_btn import BuyButtonUI
from components.download_btn import DownloadButtonUI
# Running the App
if __name__ == "__main__":
# Configuration
st.set_page_config("Supremebot", "img/icon.png", "wide")
# Intialization
init()
# Setting up the dates selection
dates: DropDatesUI = DropDatesUI()
# Setting up categories selection
category: CategoriesUI = CategoriesUI()
# For each item, show the product card
ItemUI(category.items_category, dates.selected_date)
# Showing the basket content if not empty
basket: BasketUI = BasketUI()
# Creating a cjeckout form for submitting payments data
if not basket.is_empty:
# Form to compile for buying
form: CheckoutUI = CheckoutUI()
# Button for saving paying methods
with form.save_pay_method_col:
DownloadButtonUI(form)
# User input to start the Bot
with form.buy_col:
buy_btn: BuyButtonUI = BuyButtonUI()