/*SPDX-FileCopyrightText: 2022 Tanbir Jishan <tantalising007@gmail.com>SPDX-License-Identifier: GPL-2.0-or-later*/pragma ComponentBehavior: Boundimport QtQuickimport org.kde.kitemmodels as KItemModelsimport org.kde.plasma.private.kicker as KickerKickoffListView {id: rootrequired property Kicker.AppsModel gridModelhighlight: null // highlight off since it otherwise highlights a whole sectionmodel: gridModel?.sections ?? null // avoid error while page is switchedsection.property: "section"delegate: ListOfGridsViewDelegate {id: delegaterequired property int indexrequired property string sectionwidth: root.widthisCurrentSectionGrid: ListView.isCurrentItemisSearchFieldActive: kickoff.contentArea === root && kickoff.searchField.activeFocusparentView: ListView.viewflickableToScroll: root.viewgridIndex: indexmodel: KItemModels.KSortFilterProxyModel {id: sectionModelsourceModel: root.gridModelfilterString: delegate.sectionfilterRoleName: "group"function trigger(row, actionId, argument) {const filteredIndex = sectionModel.index(row, 0)const sourceIndex = sectionModel.mapToSource(filteredIndex)root.gridModel.trigger(sourceIndex.row, actionId, argument)}}onShowSectionView: sectionName => {root.showSectionViewRequested(sectionName)}}}