import request from '@/utils/request';

export function sendSellerCode(phone: string) {
  return request.post('/api/merchant/auth/send-code', { phone });
}

export function loginByCode(phone: string, code: string) {
  return request.post('/api/merchant/auth/login', { phone, code });
}

export function loginByPassword(phone: string, password: string) {
  return request.post('/api/merchant/auth/login', { phone, password });
}

export function getSellerProfile() {
  return request.get('/api/merchant/auth/profile');
}

export function getMerchantInfo() {
  return request.get('/api/merchant/profile/mine');
}

export function updateMerchantProfile(data: any) {
  return request.put('/api/merchant/profile/update', data);
}
