File size: 575 Bytes
0f0ef8d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import streamlit as st


FPSO_PADRAO = [
    "CDA",
    "CDP",
    "CDM",
    "ADG",
    "ESS",
    "SEP",
    "CDI",
    "ATD",
    "CDS"
]


def campo_fpso(label, key):
    """

    Campo FPSO com sugestões + opção de texto livre

    """
    opcoes = [""] + FPSO_PADRAO + ["Outro"]

    escolha = st.selectbox(
        label,
        opcoes,
        key=f"{key}_select"
    )

    if escolha == "Outro":
        return st.text_input(
            f"{label} (digite)",
            key=f"{key}_texto"
        ).strip()

    return escolha