import Controller from '@ember/controller';
import { computed } from '@ember/object';
import { readOnly } from '@ember/object/computed';

import { pagination } from '../utils/pagination';

export default class CategoriesController extends Controller {
  queryParams = ['page', 'per_page', 'sort'];
  page = '1';
  per_page = 100;
  sort = 'alpha';

  @readOnly('model.meta.total') totalItems;

  @pagination() pagination;

  @computed('sort')
  get currentSortBy() {
    return this.sort === 'crates' ? '# Crates' : 'Alphabetical';
  }
}

@@ -46,22 +46,21 @@
 mport %7B 
-comput
+track
 ed %7D fro
@@ -67,23 +67,28 @@
 m '@
-ember/object
+glimmer/tracking
 ';%0A
+%0A
 impo
@@ -96,20 +96,17 @@
 t %7B read
-Only
+s
  %7D from 
@@ -110,30 +110,24 @@
 om '
-@ember/object/computed
+macro-decorators
 ';%0A%0A
@@ -288,16 +288,25 @@
 rt'%5D;%0A  
+@tracked 
 page = '
@@ -311,16 +311,25 @@
  '1';%0A  
+@tracked 
 per_page
@@ -338,16 +338,25 @@
  100;%0A  
+@tracked 
 sort = '
@@ -375,12 +375,9 @@
 read
-Only
+s
 ('mo
@@ -439,28 +439,8 @@
 n;%0A%0A
-  @computed('sort')%0A
   ge

Use `macro-decorators` instead of computed properties