import { buildApiUrl } from '../../../../core/config/api-url.util';


export const STATE_ENDPOINTS = {
    dataTable: buildApiUrl(
        'masterAdmin',
        '/v1/states/datatable'
    ),

    create: buildApiUrl(
        'masterAdmin',
        '/v1/states'
    ),

    getById: (id: string) =>
        buildApiUrl(
            'masterAdmin',
            `/v1/states/${encodeURIComponent(id)}`
        ),

    autocomplete: buildApiUrl(
        'masterAdmin',
        '/v1/states/autocomplete'
    ),

    update: (id: string) =>
        buildApiUrl(
            'masterAdmin',
            `/v1/states/${encodeURIComponent(id)}`
        ),

    delete: (id: string) =>
        buildApiUrl(
            'masterAdmin',
            `/v1/states/${encodeURIComponent(id)}`
        ),

    changeStatus: (id: string) =>
        buildApiUrl(
            'masterAdmin',
            `/v1/states/${encodeURIComponent(id)}/status`
        ),
} as const;
