import { EexpenseType } from "@/components/FormulaList/types"
/**
 * 公式对应的字符数据
 * @returns 
 */
export function useCalculatorData() {
    // 动态获取：公式对应的字符
    const expenseType: EexpenseType[] = [
        // {
        //     key: '0',
        //     value: '重量',
        //     active: false
        // },
        // {
        //     key: '1',
        //     value: '体积',
        //     active: false
        // },
        // {
        //     key: '3',
        //     value: '长',
        //     active: false

        // },
        // {
        //     key: '4',
        //     value: '宽',
        //     active: false
        // },
        // {
        //     key: '5',
        //     value: '高',
        //     active: false
        // }
    ]

    const expenseType2: EexpenseType[] = [
        {
            key: '{<}',
            value: '<',
            active: false
        },
        {
            key: '{@}',
            value: '@',
            active: false
        },
        {
            key: '{&}',
            value: '&',
            active: false
        },
        {
            key: '{<=}',
            value: '<=',
            active: false

        },
        {
            key: '{?}',
            value: '?',
            active: false
        },
        {
            key: '{(}',
            value: '(',
            active: false
        },
        {
            key: '{==}',
            value: '==',
            active: false
        },
        {
            key: '{:}',
            value: ':',
            active: false
        },
        {
            key: '{)}',
            value: ')',
            active: false
        },
        {
            key: '{>}',
            value: '>',
            active: false
        },
        {
            key: '{$}',
            value: '$',
            active: false
        },
        {
            key: '{>=}',
            value: '>=',
            active: false
        },
        {
            key: '{|}',
            value: '|',
            active: false
        },
        {
            key: '{<==}',
            value: '清除',
            active: false
        },
    ]
    // 计算符号
    const expenseType3: EexpenseType[] = [
        {
            key: '{0}',
            value: '0',
            active: false
        },
        {
            key: '{1}',
            value: '1',
            active: false
        },
        {
            key: '{2}',
            value: '2',
            active: false
        },
        {
            key: '{3}',
            value: '3',
            active: false

        },
        {
            key: '{4}',
            value: '4',
            active: false
        },
        {
            key: '{5}',
            value: '5',
            active: false
        },
        {
            key: '{6}',
            value: '6',
            active: false
        },
        {
            key: '{7}',
            value: '7',
            active: false
        },
        {
            key: '{8}',
            value: '8',
            active: false
        },
        {
            key: '{9}',
            value: '9',
            active: false
        },
        {
            key: '{.}',
            value: '.',
            active: false
        },
        {
            key: '{+}',
            value: '+',
            active: false
        },
        {
            key: '{-}',
            value: '-',
            active: false
        },
        {
            key: '{*}',
            value: '*',
            active: false
        },
        {
            key: '{/}',
            value: '/',
            active: false
        }
    ]

    // 组合计算器符号
    const calculatorData = {
        EexpenseFeeItem: [],
        EexpenseOne: expenseType,
        EexpenseTwo: expenseType2,
        EexpenseThree: expenseType3,
    }
    return {
        calculatorData
    }
}