import request from '@/utils/request'
import { sellerShopHeaders } from '@/utils/sellerShop'

// 收款账户列表
export function listSellerPayAccounts(query) {
  return request({
    url: '/agri/seller/finance/payAccount/list',
    method: 'get',
    params: query,
    headers: sellerShopHeaders()
  })
}

// 提现可选账户（供提现管理协作）
export function listSellerPayAccountOptions() {
  return request({
    url: '/agri/seller/finance/payAccount/options',
    method: 'get',
    headers: sellerShopHeaders()
  })
}

// 添加收款账户
export function addSellerPayAccount(data) {
  return request({
    url: '/agri/seller/finance/payAccount',
    method: 'post',
    data: data,
    headers: sellerShopHeaders()
  })
}

// 编辑收款账户
export function updateSellerPayAccount(data) {
  return request({
    url: '/agri/seller/finance/payAccount',
    method: 'put',
    data: data,
    headers: sellerShopHeaders()
  })
}

// 删除收款账户
export function delSellerPayAccount(accountId) {
  return request({
    url: '/agri/seller/finance/payAccount/' + accountId,
    method: 'delete',
    headers: sellerShopHeaders()
  })
}
