1import{o as e,r as t}from"./rolldown-runtime-C0FnF6B9.js";import{C as n,D as r,E as i,Ft as a,Lt as o,S as s,Z as c,j as l,q as u,t as d,ut as f,w as p,x as m}from"./vue.runtime.esm-bundler-CFudVDr2.js";import{t as h}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as g}from"./lodash-B9Vws8nc.js";var _=`myAccount`,v=`vizcab`,y=`myLicence`,b=`others`,x=`manufacturers`,S={MY_ACCOUNT:`my_account`,VIZCAB:`vizcab`,MY_LICENSE:`my_license`,OTHERS:`others`},C=e(g(),1),w={name:`OwnerFilter`,data(){return{maxDisplay:2,ITEM_NAME_CHARACTER_LIMIT:26}},computed:{itemTextAccordingToLanguage(){return this.$i18n.locale===`fr`?`itemTextFR`:`itemTextEN`},ownerItems(){return[{itemTextFR:this.$t(`account.my-account`),itemTextEN:this.$t(`account.my-account`),itemValue:_},{itemTextFR:this.$t(`mc.filters.vizcab`),itemTextEN:this.$t(`mc.filters.vizcab`),itemValue:v},{itemTextFR:this.$t(`mc.filters.my-licence`),itemTextEN:this.$t(`mc.filters.my-licence`),itemValue:y},{itemTextFR:this.$t(`mc.filters.others`),itemTextEN:this.$t(`mc.filters.others`),itemValue:b}]},selectedOwners:{get(){let e=[],t=this.$store.state.macroComposants.ownerFilters;return this.ownerItems.forEach(n=>{t[n.itemValue]?.isActive&&e.push(n)}),e},set(e){this.$store.commit(`macroComposants/setOwnerFilters`,[_,!1]),this.$store.commit(`macroComposants/setOwnerFilters`,[v,!1]),this.$store.commit(`macroComposants/setOwnerFilters`,[y,!1]),this.$store.commit(`macroComposants/setOwnerFilters`,[b,!1]),e.forEach(e=>{this.$store.commit(`macroComposants/setOwnerFilters`,[e.itemValue,!0])})}},isOwnerFilterActive:{get(){return this.$store.state.macroComposants.activeFilters[2]},set(e){this.$store.commit(`macroComposants/setActiveFilters`,[2,e])}}},watch:{selectedOwners(){this.updateActiveFilterIndicator()}},methods:{updateActiveFilterIndicator(){this.isOwnerFilterActive=this.selectedOwners.length>0?{itemTextFR:`Propriétaire`,itemTextEN:`Owner`,itemTextDE:`Eigentümer`,itemValue:`owner`}:null},removeOwnerSelection(e){this.selectedOwners=this.selectedOwners.filter(t=>t.itemValue!==e.itemValue)},shortenItemLabel(e){return(0,C.truncate)(e,{length:this.ITEM_NAME_CHARACTER_LIMIT})},shouldShowTooltip(e){return e?.length>this.ITEM_NAME_CHARACTER_LIMIT}}},T=t({default:()=>O});d();var E={class:`mb-4`};function D(e,t,d,h,g,_){let v=c(`v-tooltip`),y=c(`v-chip`),b=c(`v-select`);return u(),p(`div`,E,[r(b,{modelValue:_.selectedOwners,"onUpdate:modelValue":t[0]||=e=>_.selectedOwners=e,"item-title":_.itemTextAccordingToLanguage,"item-value":`itemValue`,items:_.ownerItems,label:e.$t(`mc.filters.owner`),density:`compact`,chips:``,"hide-details":``,variant:`outlined`,"return-object":``,multiple:``,clearable:``,"clear-icon":`mdi-close-circle`,"bg-color":`white`},{selection:f(({item:t,index:c})=>[c<g.maxDisplay?(u(),s(y,{key:0,size:`small`,closable:``,color:`blue_green_1`,class:`text-paragraph-regular-s text-white`,"onClick:close":e=>_.removeOwnerSelection(t.raw)},{default:f(()=>[r(v,{location:`bottom`,disabled:!_.shouldShowTooltip(e.$i18n.locale===`fr`?t.raw.itemTextFR:t.raw.itemTextEN)},{activator:f(({props:n})=>[m(`span`,a(l(n)),o(_.shortenItemLabel(e.$i18n.locale===`fr`?t.raw.itemTextFR:t.raw.itemTextEN)),17)]),default:f(()=>[m(`span`,null,o(e.$i18n.locale===`fr`?t.raw.itemTextFR:t.raw.itemTextEN),1)]),_:2},1032,[`disabled`])]),_:2},1032,[`onClick:close`])):n(``,!0),c===g.maxDisplay?(u(),s(y,{key:1,size:`small`,color:`blue_green_1`,class:`text-white text-caption`},{default:f(()=>[i(` +`+o(_.selectedOwners.length-g.maxDisplay),1)]),_:1})):n(``,!0)]),_:1},8,[`modelValue`,`item-title`,`items`,`label`])])}var O=h(w,[[`render`,D]]);export{y as a,v as c,_ as i,T as n,b as o,x as r,S as s,O as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.