from typing import Union, Any, Optional import streamlit as st from common.constants_general import justifications_list def main_selection_layout() -> Union[Any, Any, Any, Any, Any, Any, Any, Any]: """ Function to create layout of components for main Streamlit page :return: selection values """ detailed_justification_ = None with st.container(border=True): st.write("EXPORT TRACKER") col1, col2 = st.columns(2) with col1: report_type_ = st.selectbox( label="Report Type*", placeholder="select", options=["Form Response", "Mailing List"], index=None, key="report_type", ) approver_ = st.text_input(label="Approver*", key="approver") requester_ = st.text_input(label="Requester*", key="requester") justification_ = st.selectbox( placeholder="select", label="Business Justification*", options=justifications_list, index=None, key="justification", ) if justification_ == "Other": detailed_justification_ = st.text_input( label="Specify justification*", key="detailed_justification" ) with col2: recepient_name_ = st.text_input(label="Recepient Name*", key="recepient_name") recepient_co_ = st.text_input(label="Recepient Company*", key="recepient_co") recepient_email_ = st.text_input(label="Recepient Email*", key="recepient_email") recepient_phone_ = st.text_input(label="Recepient Phone Number*", key="recepient_phone") if detailed_justification_ is not None: final_justification_: Optional[str] = detailed_justification_ else: final_justification_ = justification_ return ( report_type_, recepient_name_, recepient_co_, recepient_email_, recepient_phone_, final_justification_, requester_, approver_, )