using Microsoft.AspNetCore.Components;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using wispro.sp.entity;

namespace wispro.sp.web.Components
{
    public partial class PerformanceItemRow
    {
        [Parameter]
        public PerformanceItem EditingItem { get; set; }

        [Parameter]
        public EventCallback<PerformanceItem> OnSubmitShenSu { get; set; }

        [Parameter]
        public EventCallback<PerformanceItem> OnSWJXSF { get; set; }

        class Reason
        {
            public string Value { get; set; }
            public string Name { get; set; }
        }

        List<Reason> _Reasons = new List<Reason>()
        {
            new Reason(){Name="PCT首次英文案",Value="PCT首次英文案"},
            new Reason(){Name="我方转格式、复核",Value="我方转格式、复核"},
            new Reason(){Name="台湾案转大陆案",Value="台湾案转大陆案"},
            new Reason(){Name="大陆案转台湾案",Value="大陆案转台湾案"},
            new Reason(){Name="同套大陆+台湾",Value="同套大陆+台湾"},
            new Reason(){Name="不请款",Value="不请款"},
            new Reason(){Name="撤回后重新递交",Value="撤回后重新递交"},
            new Reason(){Name="发文后客户取消申请",Value="发文后客户取消申请"},
            new Reason(){Name="发文后客户原因取消申请，系统结案",Value="发文后客户原因取消申请，系统结案"},
            new Reason(){Name="改权",Value="改权"},
            new Reason(){Name="改权+改说明书",Value="改权+改说明书"},
            new Reason(){Name="客户不进行答辩",Value="客户不进行答辩"},
            new Reason(){Name="客户提供答辩点，撰写英文报导函",Value="客户提供答辩点，撰写英文报导函"},
            new Reason(){Name="客户未提供答辩点，撰写英文报导函",Value="客户未提供答辩点，撰写英文报导函辩"},
            new Reason(){Name="内-外",Value="内-外"},
            new Reason(){Name="外-内",Value="外-内"},
            new Reason(){Name="外-内首次申请",Value="外-内首次申请"},
            new Reason(){Name="请款",Value="请款"},
            new Reason(){Name="涉外OA不答辩，发报导函结案",Value="涉外OA不答辩，发报导函结案"},
            new Reason(){Name="涉外实质改权",Value="涉外实质改权"},
            new Reason(){Name="首次中文案",Value="首次中文案"},
            new Reason(){Name="我方转格式、复核",Value="我方转格式、复核"},
            new Reason(){Name="外所/他人首次转入OA",Value="外所/他人首次转入OA"},
            new Reason(){Name="我方代交",Value="我方代交"},
            new Reason(){Name="转格式",Value="转格式"},
            new Reason(){Name="撰写中客户取消申请",Value="撰写中客户取消申请"}


        };
        bool isChecked = false;
        private void OnsubShensu()
        {
            if (OnSubmitShenSu.HasDelegate)
            {
                OnSubmitShenSu.InvokeAsync(EditingItem);
            }
        }

        private void OnSWJXType()
        {
            if (OnSWJXSF.HasDelegate)
            {
                OnSWJXSF.InvokeAsync(EditingItem);
            }
        }
    }
}
