 # Panel 2: Initial Inputs
# The following Notion provides an Overview and details on Workflows: https://www.notion.so/Line-Chart-User-Input-Forms-16fcae16861d80369c88c6a8a56c5ae6?pvs=4#175cae16861d80a49d98e5feebb5016d
- scroller:
    name: "sharePricePerformanceLineChartInitialInputs"
    title: "Initial Inputs"
    content:
      - divider:
          name: keyInputs
          title: Key Inputs
          type: primary

      - divider:
          name: companiesOnChart
#          title: Companies / Indices To Include
          title: Companies
          type: secondary

      # Workflow: OW1
      - table:
          name: companiesOnChartTable
          columns:
            # Workflow: OW1(a). A number for each row we add
            - "#":
                name: "#"
                type: number
                dataIndex: id
            # Workflow: OW1(b). Drop down menu between "Primary Company" and "Peer Company"
            - Category:
                name: Line Category
                type: string
                dataIndex: lineCategory
#            # Workflow OW1(c). For each row, this is a Search box. Details in Notion.   User types in either the company name or the company ticker and the search box auto-completes.
            - Company:
                name: Company Name & Ticker
                type: string
                dataIndex: companyNameAndTicker

            - Data Type:
                name: DataType
                type: dropDown
                dataIndex: dataType
                options:
                    - Closing Share Price
                    - Adjusted Closing Share Price
            - Remove: # New delete button column
                name: removeCompany
                type: button
                dataIndex: id  # Use the row's ID to identify deletion target
                iconType: CloseOutlined  # Icon for the button

      # Workflow: OW1(d). Each time this button is selected, a new row in the table is added where the user can input relevant values
      # Workflow: OW1(e). For each row that is added, there should be a cancel button that gets added on the far left that allows us to delete the row as desired
      - aligner:
          align: right
          width: auto
          content:
            - button:
                name: addCompany
                type: primary
                title: Add Company
                style:
                  marginTop: "10px"
                  backgroundColor: "#FFC000"

      - divider:
          name: timePeriod
          title: Time Period and Currency
          type: secondary
      - range:
          name: timePeriodInitialInputs
          dataIndex: timePeriod
          title: Time Period
      # Workflow: OW2. The below options list should connect to the backend with all the available currencies in the list
      - slot:
          name: currencySelectionSlot

      - divider:
          name: displayFeature
          title: Display Features
          type: primary
          style:
            paddingTop: 30px

      - text:
          name: indexationAdjustmentQuestion
          text: >
            <p><strong>Having company share prices displayed by there actual traded value on a chart may hinder comparability as they can have vastly different starting points. Select here if you would like your chart to have a single starting point with daily implied percentage change values driving the change over time.</strong></p>
      - grid:
          # Workflow AN1
          # Workflow OW3
          content:
            - imageButton:
                name: percentageChangeChart
                dataIndex: percentageChangeChart
                title: Percentage Change Chart
                subtitle: Each line on the chart starts at a user-selected value on the primary vertical axis, enhancing line comparability.
                image: /assets/line_chart/Index.png
            - imageButton:
                name: actualTradedValueChart
                dataIndex: actualTradedValueChart
                title: Actual Traded Value Chart
                subtitle: No indexation adjustment is made
                image: /assets/line_chart/noIndex.png

      - text:
          name: includeCustomBuiltIndexQuestion
          text: >
            <p><strong>Would you like to add constant value line(s) to your chart? These line(s) represent fixed values such as an offer price or median trading value and are displayed as dashed lines on the chart.</strong></p>
      - grid:
          # Workflow AN1
          # Workflow OW3: [Barry WIP - Update images below to be the actual content images]
          content:
            - imageButton:
                name: addCustomBuiltIndices
                dataIndex: addCustomBuiltIndices
                title: Add Custom Built Indices
                subtitle: Allows you to add a custom built index made up of select companies as chosen by you.
                image: /assets/line_chart/customBuildIndexLine.png
            - imageButton:
                name: noCustomBuiltIndices
                dataIndex: noCustomBuiltIndices
                title: No Custom Built Indices
                subtitle: No custom built index lines are added to your chart.
                image: /assets/line_chart/noCustomBuildIndexLine.png

      - text:
          name: includeStaticLineQuestion
          text: >
            <p><strong>Would you like to add constant value line(s) to your chart? These line(s) represent fixed values such as an offer price or median trading value and are displayed as dashed lines on the chart. </strong></p>
      - grid:
          # Workflow AN1
          # Workflow OW3: [Barry WIP - Update images below to be the actual content images]
          content:
            - imageButton:
                name: addConstantLineSelection
                dataIndex: addConstantLineSelection
                title: Add Constant Value Line(s)
                subtitle: Add a horizontal line at a specified value on the Primary Vertical Axis. This helps track specific metrics like median or target prices.
                image: /assets/line_chart/staticValueLine.png

            - imageButton:
                name: noConstantLineSelection
                dataIndex: noConstantLineSelection
                title: No Constant Value Line(s)
                subtitle: Choose this if you prefer not to add any fixed lines to your chart.
                image: /assets/line_chart/NostaticLine.png


      # Workflow NN1. The back button takes the user to the prior Panel
      - aligner:
          align: right
          width: auto
          content:
            - button:
                name: backBtn
                type: default
                title: Back
            # Workflow NN2.
            - button:
                name: nextBtn
                type: primary
                title: Next
            # Workflow NN1. The cancel button closes the dialog box
            - button:
                name: btnCancel
                type: default
                title: Cancel
