2023-03-14 13:18:55 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) HashiCorp, Inc.
|
2023-08-11 13:12:13 +00:00
|
|
|
* SPDX-License-Identifier: BUSL-1.1
|
2023-03-14 13:18:55 +00:00
|
|
|
*/
|
|
|
|
|
2020-03-31 17:03:15 +00:00
|
|
|
import Helper from '@ember/component/helper';
|
|
|
|
import { inject as service } from '@ember/service';
|
|
|
|
|
2020-12-08 09:27:28 +00:00
|
|
|
export default class StateMatchesHelper extends Helper {
|
|
|
|
@service('state') state;
|
|
|
|
|
2020-03-31 17:03:15 +00:00
|
|
|
compute([state, values], hash) {
|
|
|
|
return this.state.matches(state, values);
|
2020-12-08 09:27:28 +00:00
|
|
|
}
|
|
|
|
}
|