2017-11-21 05:53:09 -05:00
|
|
|
import SelectKitHeaderComponent from "select-kit/components/select-kit/select-kit-header";
|
2020-08-28 15:30:20 -04:00
|
|
|
import layout from "select-kit/templates/components/multi-select/multi-select-header";
|
2021-08-23 04:44:19 -04:00
|
|
|
import { computed } from "@ember/object";
|
|
|
|
import { reads } from "@ember/object/computed";
|
2017-10-19 15:51:08 -04:00
|
|
|
|
2017-11-21 05:53:09 -05:00
|
|
|
export default SelectKitHeaderComponent.extend({
|
2021-08-23 04:44:19 -04:00
|
|
|
tagName: "summary",
|
2020-02-03 08:22:14 -05:00
|
|
|
classNames: ["multi-select-header"],
|
2021-09-21 11:19:49 -04:00
|
|
|
attributeBindings: ["ariaLabel:aria-label"],
|
2020-08-28 15:30:20 -04:00
|
|
|
layout,
|
2017-10-19 15:51:08 -04:00
|
|
|
|
2021-08-23 04:44:19 -04:00
|
|
|
caretUpIcon: reads("selectKit.options.caretUpIcon"),
|
|
|
|
caretDownIcon: reads("selectKit.options.caretDownIcon"),
|
2021-09-21 11:19:49 -04:00
|
|
|
ariaLabel: reads("selectKit.options.headerAriaLabel"),
|
2021-08-23 04:44:19 -04:00
|
|
|
caretIcon: computed(
|
|
|
|
"selectKit.isExpanded",
|
|
|
|
"caretUpIcon",
|
|
|
|
"caretDownIcon",
|
|
|
|
function () {
|
|
|
|
return this.selectKit.isExpanded ? this.caretUpIcon : this.caretDownIcon;
|
2020-09-15 03:39:12 -04:00
|
|
|
}
|
2021-08-23 04:44:19 -04:00
|
|
|
),
|
2017-10-19 15:51:08 -04:00
|
|
|
});
|