Ronald 9d21736e9f
Add UI copyright headers files (#16614)
* Add copyright headers to UI files

* Ensure copywrite file ignores external libs
2023-03-14 09:18:55 -04:00

27 lines
640 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
import { inject as service } from '@ember/service';
export default class State extends Component {
@service('state') state;
@tracked render = false;
@action
attributeChanged([state, matches, notMatches]) {
if (typeof state === 'undefined') {
return;
}
this.render =
typeof matches !== 'undefined'
? this.state.matches(state, matches)
: !this.state.matches(state, notMatches);
}
}