import { API_URL } from '../../config'
import { TrashboxDispose, DisposeResponse } from './types'

const composeDisposeURL = () => (
    API_URL + '/announcement/dispose?'
)

const composeDisposeBody = (ann_id: number, trashbox: TrashboxDispose) => (
    JSON.stringify({
        ann_id,
        trashbox,
    })
)

const processDispose = (data: DisposeResponse): boolean => {
    return data.Success
}

export { composeDisposeURL, composeDisposeBody, processDispose }
