
import streamlit.components.v1 as components
from pollination_streamlit.selectors import get_api_client
from pollination_streamlit_io import (create_study, run_card, run_details)

import streamlit as st

api_client = get_api_client()

studyInfo = create_study('st-study', api_client)

if studyInfo:
    out_run = run_card(
        'run-card',
        api_client,
        project_name = studyInfo.get('projectName'),
        project_owner = studyInfo.get('accountName'),
        run = studyInfo.get('run'),
        is_local = studyInfo.get('isLocal'))
    
    if out_run:
        card = run_details(
            'run-details', 
            api_client = api_client,
            project_name = studyInfo.get('projectName'),
            project_owner = studyInfo.get('accountName'),
            run = out_run,
            is_local = studyInfo.get('isLocal'))
