import { hasPermission } from '@Plugins/RolePermission.js';

const can = (permission) => hasPermission(`units.${permission}`)

const viewTo = ({ name = '', params = {}, query = {} }) =>
    ({ name: `pos.unitMeasure.${name}`, params, query })

export { can, viewTo }
