import { convertSeparators } from "@/utils/regexp/convertSeparators";
import { removeSpaces } from "@/utils/regexp/removeSpaces";

export const inputRexArray = (prop: string, _searchParam: any) => {
    _searchParam.value[prop] = removeSpaces(_searchParam.value[prop]);
    _searchParam.value[prop] =
        _searchParam.value[prop].indexOf("，") > -1 ? convertSeparators(_searchParam.value[prop]) : _searchParam.value[prop];
    if (_searchParam.value[prop].indexOf(",") > -1) {
        _searchParam.value[prop] = _searchParam.value[prop].split(",");
    } else {
        let array = [];
        array.push(_searchParam.value[prop]);
        _searchParam.value[prop] = array;
    }
};
