import { getStore, setStore, removeStore } from "./store";

const adminId = "ADMIN-ID";
const adminToken = "ADMIN-TOKEN";
const customerId = "customerId";
const companyName = "companyName";

// 获取token
export function getToken() {
    return getStore(adminToken);
}

// 设置token
export function setToken(sid) {
    return setStore(adminToken, sid, 365);
}

// 删除token
export function removeToken() {
    return removeStore(adminToken);
}

// 获取admin_id
export function getAdminId() {
    return getStore(adminId);
}

// 设置admin_id
export function setAdminId(id) {
    return setStore(adminId, id, 365);
}

// 删除admin_id
export function removeAdminId() {
    return removeStore(adminId);
}

// 获取customerId
export function getCustomerId() {
    return getStore(customerId);
}

// 设置customerId
export function setCustomerId(id) {
    return setStore(customerId, id);
}

// 删除customerId
export function removeCustomerId() {
    return removeStore(customerId);
}

// 获取companyName
export function getCompanyName() {
    return getStore(companyName);
}

// 设置companyName
export function setCompanyName(id) {
    return setStore(companyName, id);
}

// 删除companyName
export function removeCompanyName() {
    return removeStore(companyName);
}
