from selenium.webdriver.common.by import By
from Base.BasePage import BasePage
from config import AI_review_empid, AI_Prequalification_empid,AI_Newmediaeditor_empid,AI_Bookreview_empid,AI_Digitalcreation_empid,AI_Selectedtopic_empid,AI_Topicplanning_empid


# AI编辑工作室首页
class AIER(BasePage):
    def __init__(self):
        super().__init__('web')
        # AI审校编辑
        self.AI_review = (By.CSS_SELECTOR, f"div[id='studio-empId-{AI_review_empid}'] div[class='studio-item-inner']")
        # AI预审编辑
        self.AI_Prequalification = (
        By.CSS_SELECTOR, f"div[id='studio-empId-{AI_Prequalification_empid}'] div[class='studio-item-inner']")
        # AI新媒体编辑
        self.AI_Newmediaeditor = (
        By.CSS_SELECTOR, f"div[id='studio-empId-{AI_Newmediaeditor_empid}'] div[class='studio-item-inner']")
        # AI书评编辑
        self.AI_Bookreview = (
        By.CSS_SELECTOR, f"div[id='studio-empId-{AI_Bookreview_empid}'] div[class='studio-item-inner']")
        # AI数字创作编辑
        self.AI_Digitalcreation = (
        By.CSS_SELECTOR, f"div[id='studio-empId-{AI_Digitalcreation_empid}'] div[class='studio-item-inner']")
        # AI选题情报员
        self.AI_Selectedtopic = (
        By.CSS_SELECTOR, f"div[id='studio-empId-{AI_Selectedtopic_empid}'] div[class='studio-item-inner']")
        # AI选题策划编辑
        self.AI_Topicplanning= (
        By.CSS_SELECTOR, f"div[id='studio-empId-{AI_Topicplanning_empid}'] div[class='studio-item-inner']")

    # 点击AI预审
    def to_AI_Prequalification(self):
        self.find_ele(self.AI_Prequalification).click()

    # 点击AI审校
    def to_AI_review(self):
        self.find_ele(self.AI_review).click()

    # 点击新媒体编辑
    def to_AI_Newmediaeditor(self):
        self.find_ele(self.AI_Newmediaeditor).click()

    # 点击AI书评编辑
    def to_AI_Bookreview(self):
        self.find_ele(self.AI_Bookreview).click()

    # 点击AI数字创作编辑
    def to_AI_Digitalcreation(self):
        self.find_ele(self.AI_Digitalcreation).click()

    # 点击AI选题情报员
    def to_AI_Selectedtopic(self):
        self.find_ele(self.AI_Selectedtopic).click()

    # 点击AI选题策划编辑
    def to_AI_Topicplanning(self):
        self.find_ele(self.AI_Topicplanning).click()