module OA
  class AddVendorProposedTermPage < OA::BasePage
    page_url "/cont_mgmt/add_vendor_proposed_term.php"

    div(:alert_error, id: "err_msg")
    button(:submit_button, value: "Submit")
    # mandatory fields
    select_list(:orchard_closer, name: "orchrep_name")
    checkbox(:digital_distribution_type, name: "dig_distribution_type[0]")
    select_list(:chance_to_close, name: "chance_to_close")
    select_list(:estimated_to_close_year, name: "eta_to_close_year")
    select_list(:estimated_to_close_quarter, name: "eta_to_close_quarter")
    radio(:encoding_fees_cap_back, value: "9999")
    text_field(:encoding_fees_cap_new_release, name: "encoding_fees_cap_new_release")
    text_field(:digital_split, name: "digital_split")
    select_list(:payment_interval, name: "payment_interval")
    select_list(:payout_currency, name: "currency_id")
    select_list(:pay_after, name: "pay_after")
    # non-mandatory fields
    text_field(:budgeted_advance, name: "budgeted_advance")
    text_field(:proposed_term, name: "proposed_term")
    text_field(:proposed_rollover_period, name: "proposed_rollover_period")
    radio(:other_rights, value: "any_and_all")
    select_list(:sound_recording, name: "srco_rep")
    select_list(:status, name: "pro_status")
    textarea(:status_detail, name: "status_detail")
    select_list(:extend_term_until_recouped, name: "extend_until_recouped")
    text_field(:advance_recoupable_percentage, name: "advance_recoupable_percentage")
    textarea(:negotiated_change, name: "negotiated_change_comments")
    text_field(:physical_split, name: "physical_split")
    select_list(:full_track_publishing, name: "oms_type")
    select_list(:ringtone_publishing_type, name: "ringtone_publishing_type")
    text_field(:oms_mechanical, name: "oms_fee_percentage")
    text_field(:special_product_split, name: "special_product_split")
    select_list(:special_product_carveout, name: "sp_country_carve_out[]")
    select_list(:special_continents, name: "sp_continents[]")
    select_list(:youtube_composition_clause, name: "youtube_composition_clause")
    select_list(:opt_out, name: "opt_out")
    select_list(:apply_fx_spread, name: "apply_fx_spread")
    select_list(:dms_carve_out, name: "dms_carve_out[]")
    select_list(:territory_carve_out, name: "territory_carve_out[]")
    select_list(:continent_carveout, name: "lstContinents[]")
    text_field(:sync_admin_split, name: "sync_admin_commission")
    text_field(:royalty_collection_split, name: "royalty_collection_commission")
    text_field(:sx_royalty_split, name: "sx_royalty_collection_commission")
    select_list(:sync_admin_territory, name: "sync_admin_territory[]")
    select_list(:royalty_collection_territory, name: "royalty_collection_territory[]")
    # Below new 3 compilation fields enabled via feature flag 'vendor_contract_compilation'
    select_list(:orchard_compilation_agreement, name: "orchard_compilation_agreement")
    text_field(:orchard_compilation_split, name: "orchard_compilation_split")
    select_list(:orchard_compilation_authorization, name: "orchard_compilation_authorization_required")
  end
end
