import{Y as me,Q as R,_ as ce,M as ue,H as ke,I as ve,T as fe,r as h,o as c,a as M,w as u,l as p,b,u as S,v as N,F as A,p as y,h as H,q as Ne,e as pe,n as ge}from"./main-DtyiNRRn.js";import{d as W,_ as he}from"./shoppingcartMixin-BwPtJIar.js";var D={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"addMemoListToCart"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accessToken"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BaseSiteId"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"memoListCode"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isIds"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"lang"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addMemoListToCart"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accessToken"},value:{kind:"Variable",name:{kind:"Name",value:"accessToken"}}},{kind:"Argument",name:{kind:"Name",value:"baseSiteId"},value:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}}},{kind:"Argument",name:{kind:"Name",value:"memoListCode"},value:{kind:"Variable",name:{kind:"Name",value:"memoListCode"}}},{kind:"Argument",name:{kind:"Name",value:"isIds"},value:{kind:"Variable",name:{kind:"Name",value:"isIds"}}},{kind:"Argument",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}},{kind:"Argument",name:{kind:"Name",value:"lang"},value:{kind:"Variable",name:{kind:"Name",value:"lang"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"guid"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:348}};D.loc.source={body:`mutation addMemoListToCart(
  $accessToken: String!
  $baseSiteId: BaseSiteId!
  $memoListCode: String!
  $isIds: Boolean!
  $userId: String!
  $lang: String
) {
  addMemoListToCart(
    accessToken: $accessToken
    baseSiteId: $baseSiteId
    memoListCode: $memoListCode
    isIds: $isIds
    userId: $userId
    lang: $lang
  ) {
    guid
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function I(e,i){if(e.kind==="FragmentSpread")i.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&i.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(a){I(a,i)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(a){I(a,i)}),e.definitions&&e.definitions.forEach(function(a){I(a,i)})}var B={};(function(){D.definitions.forEach(function(i){if(i.name){var n=new Set;I(i,n),B[i.name.value]=n}})})();function Y(e,i){for(var n=0;n<e.definitions.length;n++){var a=e.definitions[n];if(a.name&&a.name.value==i)return a}}function be(e,i){var n={kind:e.kind,definitions:[Y(e,i)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var a=B[i]||new Set,s=new Set,d=new Set;for(a.forEach(function(t){d.add(t)});d.size>0;){var o=d;d=new Set,o.forEach(function(t){if(!s.has(t)){s.add(t);var r=B[t]||new Set;r.forEach(function(l){d.add(l)})}})}return s.forEach(function(t){var r=Y(e,t);r&&n.definitions.push(r)}),n}be(D,"addMemoListToCart");var g={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"CartProductBestPriceParts"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CartProduct"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"bestPrice"},arguments:[{kind:"Argument",name:{kind:"Name",value:"baseSiteId"},value:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}}},{kind:"Argument",name:{kind:"Name",value:"accessToken"},value:{kind:"Variable",name:{kind:"Name",value:"accessToken"}}},{kind:"Argument",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"productName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"deliverySpeed"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"initialQuantity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"requestedQuantity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"price"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"basePriceUnit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"basePriceUnitValueFormatted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"basePriceUnitValueFormattedGross"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"basePrices"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currencyIso"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currencySymbol"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"qty"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"unit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"valueFormatted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"valueFormattedGross"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"currencyIso"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"currencySymbol"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"minQuantity"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalValue"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalValueFormatted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalValueFormattedGross"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"unit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"valueFormatted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"valueFormattedGross"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pricePerUnitFormatted"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"priceRows"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"dateRange"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"minQtd"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"unit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"value"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"quantityStepRanges"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"rangeTo"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rangeFrom"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"rangeValue"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"stockLevels"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"available"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"inStockStatus"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"warehouse"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:981}};g.loc.source={body:`fragment CartProductBestPriceParts on CartProduct {
  bestPrice(
    baseSiteId: $baseSiteId
    accessToken: $accessToken
    userId: $userId
  ){
    productName
    deliverySpeed
    initialQuantity
    requestedQuantity
    price {
      basePriceUnit
      basePriceUnitValueFormatted
      basePriceUnitValueFormattedGross
      basePrices {
        currencyIso
        currencySymbol
        qty
        unit
        value
        valueFormatted
        valueFormattedGross
      }
      currencyIso
      currencySymbol
      minQuantity
      totalValue
      totalValueFormatted
      totalValueFormattedGross
      unit
      value
      valueFormatted
      valueFormattedGross
      pricePerUnitFormatted
    }
    priceRows {
      dateRange
      minQtd
      unit
      value
    }
    quantityStepRanges {
      rangeTo
      rangeFrom
      rangeValue
    }
    stockLevels {
      available
      inStockStatus
      warehouse {
        code
      }
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function T(e,i){if(e.kind==="FragmentSpread")i.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&i.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(a){T(a,i)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(a){T(a,i)}),e.definitions&&e.definitions.forEach(function(a){T(a,i)})}var q={};(function(){g.definitions.forEach(function(i){if(i.name){var n=new Set;T(i,n),q[i.name.value]=n}})})();function j(e,i){for(var n=0;n<e.definitions.length;n++){var a=e.definitions[n];if(a.name&&a.name.value==i)return a}}function Se(e,i){var n={kind:e.kind,definitions:[j(e,i)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var a=q[i]||new Set,s=new Set,d=new Set;for(a.forEach(function(t){d.add(t)});d.size>0;){var o=d;d=new Set,o.forEach(function(t){if(!s.has(t)){s.add(t);var r=q[t]||new Set;r.forEach(function(l){d.add(l)})}})}return s.forEach(function(t){var r=j(e,t);r&&n.definitions.push(r)}),n}Se(g,"CartProductBestPriceParts");var k={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"createMemoList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accessToken"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BaseSiteId"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"cartName"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"cartDescription"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createMemoList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accessToken"},value:{kind:"Variable",name:{kind:"Name",value:"accessToken"}}},{kind:"Argument",name:{kind:"Name",value:"baseSiteId"},value:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}}},{kind:"Argument",name:{kind:"Name",value:"cartName"},value:{kind:"Variable",name:{kind:"Name",value:"cartName"}}},{kind:"Argument",name:{kind:"Name",value:"cartDescription"},value:{kind:"Variable",name:{kind:"Name",value:"cartDescription"}}},{kind:"Argument",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalItems"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"products"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CartProductParts"},directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"CartProductBestPriceParts"},directives:[]}]}}]}}]}}],loc:{start:0,end:540}};k.loc.source={body:`#import "./cartProductPartsFragment.gql"
#import "./cartProductBestPricePartsFragment.gql"

mutation createMemoList(
  $accessToken: String!
  $baseSiteId: BaseSiteId!
  $cartName: String!
  $cartDescription: String
  $userId: String!
) {
  createMemoList(
    accessToken: $accessToken
    baseSiteId: $baseSiteId
    cartName: $cartName
    cartDescription: $cartDescription
    userId: $userId
  ) {
    code
    totalItems
    name
    description
    products {
      ...CartProductParts
      ...CartProductBestPriceParts
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var J={};function de(e){return e.filter(function(i){if(i.kind!=="FragmentDefinition")return!0;var n=i.name.value;return J[n]?!1:(J[n]=!0,!0)})}k.definitions=k.definitions.concat(de(W.definitions));k.definitions=k.definitions.concat(de(g.definitions));function $(e,i){if(e.kind==="FragmentSpread")i.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&i.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(a){$(a,i)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(a){$(a,i)}),e.definitions&&e.definitions.forEach(function(a){$(a,i)})}var O={};(function(){k.definitions.forEach(function(i){if(i.name){var n=new Set;$(i,n),O[i.name.value]=n}})})();function K(e,i){for(var n=0;n<e.definitions.length;n++){var a=e.definitions[n];if(a.name&&a.name.value==i)return a}}function ye(e,i){var n={kind:e.kind,definitions:[K(e,i)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var a=O[i]||new Set,s=new Set,d=new Set;for(a.forEach(function(t){d.add(t)});d.size>0;){var o=d;d=new Set,o.forEach(function(t){if(!s.has(t)){s.add(t);var r=O[t]||new Set;r.forEach(function(l){d.add(l)})}})}return s.forEach(function(t){var r=K(e,t);r&&n.definitions.push(r)}),n}ye(k,"createMemoList");var v={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getMemoList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BaseSiteId"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accessToken"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"code"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getMemoList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"baseSiteId"},value:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}}},{kind:"Argument",name:{kind:"Name",value:"accessToken"},value:{kind:"Variable",name:{kind:"Name",value:"accessToken"}}},{kind:"Argument",name:{kind:"Name",value:"code"},value:{kind:"Variable",name:{kind:"Name",value:"code"}}},{kind:"Argument",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"totalItems"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"products"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CartProductParts"},directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"CartProductBestPriceParts"},directives:[]}]}}]}}]}}],loc:{start:0,end:454}};v.loc.source={body:`#import "./cartProductPartsFragment.gql"
#import "./cartProductBestPricePartsFragment.gql"

query getMemoList(
  $baseSiteId: BaseSiteId!
  $accessToken: String!
  $code: String!
  $userId: String!
) {
  getMemoList(
    baseSiteId: $baseSiteId
    accessToken: $accessToken
    code: $code
    userId: $userId
  ) {
    code
    totalItems
    name
    description
    products {
      ...CartProductParts
      ...CartProductBestPriceParts
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var X={};function se(e){return e.filter(function(i){if(i.kind!=="FragmentDefinition")return!0;var n=i.name.value;return X[n]?!1:(X[n]=!0,!0)})}v.definitions=v.definitions.concat(se(W.definitions));v.definitions=v.definitions.concat(se(g.definitions));function L(e,i){if(e.kind==="FragmentSpread")i.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&i.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(a){L(a,i)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(a){L(a,i)}),e.definitions&&e.definitions.forEach(function(a){L(a,i)})}var Q={};(function(){v.definitions.forEach(function(i){if(i.name){var n=new Set;L(i,n),Q[i.name.value]=n}})})();function Z(e,i){for(var n=0;n<e.definitions.length;n++){var a=e.definitions[n];if(a.name&&a.name.value==i)return a}}function Ie(e,i){var n={kind:e.kind,definitions:[Z(e,i)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var a=Q[i]||new Set,s=new Set,d=new Set;for(a.forEach(function(t){d.add(t)});d.size>0;){var o=d;d=new Set,o.forEach(function(t){if(!s.has(t)){s.add(t);var r=Q[t]||new Set;r.forEach(function(l){d.add(l)})}})}return s.forEach(function(t){var r=Z(e,t);r&&n.definitions.push(r)}),n}Ie(v,"getMemoList");var P={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"replaceCartWithMemoList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accessToken"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BaseSiteId"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"memoListCode"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isIds"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"lang"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"replaceCartWithMemoList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accessToken"},value:{kind:"Variable",name:{kind:"Name",value:"accessToken"}}},{kind:"Argument",name:{kind:"Name",value:"baseSiteId"},value:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}}},{kind:"Argument",name:{kind:"Name",value:"memoListCode"},value:{kind:"Variable",name:{kind:"Name",value:"memoListCode"}}},{kind:"Argument",name:{kind:"Name",value:"isIds"},value:{kind:"Variable",name:{kind:"Name",value:"isIds"}}},{kind:"Argument",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}},{kind:"Argument",name:{kind:"Name",value:"lang"},value:{kind:"Variable",name:{kind:"Name",value:"lang"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"guid"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:369}};P.loc.source={body:`mutation replaceCartWithMemoList(
  $accessToken: String!
  $baseSiteId: BaseSiteId!
  $memoListCode: String!
  $isIds: Boolean!
  $userId: String!
  $lang: String
) {
  replaceCartWithMemoList(
    accessToken: $accessToken
    baseSiteId: $baseSiteId
    memoListCode: $memoListCode
    isIds: $isIds
    userId: $userId
    lang: $lang
  ) {
    code
    guid
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function w(e,i){if(e.kind==="FragmentSpread")i.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&i.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(a){w(a,i)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(a){w(a,i)}),e.definitions&&e.definitions.forEach(function(a){w(a,i)})}var U={};(function(){P.definitions.forEach(function(i){if(i.name){var n=new Set;w(i,n),U[i.name.value]=n}})})();function ee(e,i){for(var n=0;n<e.definitions.length;n++){var a=e.definitions[n];if(a.name&&a.name.value==i)return a}}function Te(e,i){var n={kind:e.kind,definitions:[ee(e,i)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var a=U[i]||new Set,s=new Set,d=new Set;for(a.forEach(function(t){d.add(t)});d.size>0;){var o=d;d=new Set,o.forEach(function(t){if(!s.has(t)){s.add(t);var r=U[t]||new Set;r.forEach(function(l){d.add(l)})}})}return s.forEach(function(t){var r=ee(e,t);r&&n.definitions.push(r)}),n}Te(P,"replaceCartWithMemoList");var f={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateMemoList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accessToken"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BaseSiteId"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"code"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"cartName"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"cartDescription"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateMemoList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accessToken"},value:{kind:"Variable",name:{kind:"Name",value:"accessToken"}}},{kind:"Argument",name:{kind:"Name",value:"baseSiteId"},value:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}}},{kind:"Argument",name:{kind:"Name",value:"code"},value:{kind:"Variable",name:{kind:"Name",value:"code"}}},{kind:"Argument",name:{kind:"Name",value:"cartName"},value:{kind:"Variable",name:{kind:"Name",value:"cartName"}}},{kind:"Argument",name:{kind:"Name",value:"cartDescription"},value:{kind:"Variable",name:{kind:"Name",value:"cartDescription"}}},{kind:"Argument",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"products"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"CartProductParts"},directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"CartProductBestPriceParts"},directives:[]}]}}]}}]}}],loc:{start:0,end:558}};f.loc.source={body:`#import "./cartProductPartsFragment.gql"
#import "./cartProductBestPricePartsFragment.gql"

mutation updateMemoList(
  $accessToken: String!
  $baseSiteId: BaseSiteId!
  $code: String!
  $cartName: String!
  $cartDescription: String
  $userId: String!
) {
  updateMemoList(
    accessToken: $accessToken
    baseSiteId: $baseSiteId
    code: $code
    cartName: $cartName
    cartDescription: $cartDescription
    userId: $userId
  ) {
    code
    name
    description
    products {
      ...CartProductParts
      ...CartProductBestPriceParts
    }
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};var ie={};function re(e){return e.filter(function(i){if(i.kind!=="FragmentDefinition")return!0;var n=i.name.value;return ie[n]?!1:(ie[n]=!0,!0)})}f.definitions=f.definitions.concat(re(W.definitions));f.definitions=f.definitions.concat(re(g.definitions));function V(e,i){if(e.kind==="FragmentSpread")i.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&i.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(a){V(a,i)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(a){V(a,i)}),e.definitions&&e.definitions.forEach(function(a){V(a,i)})}var x={};(function(){f.definitions.forEach(function(i){if(i.name){var n=new Set;V(i,n),x[i.name.value]=n}})})();function ne(e,i){for(var n=0;n<e.definitions.length;n++){var a=e.definitions[n];if(a.name&&a.name.value==i)return a}}function $e(e,i){var n={kind:e.kind,definitions:[ne(e,i)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var a=x[i]||new Set,s=new Set,d=new Set;for(a.forEach(function(t){d.add(t)});d.size>0;){var o=d;d=new Set,o.forEach(function(t){if(!s.has(t)){s.add(t);var r=x[t]||new Set;r.forEach(function(l){d.add(l)})}})}return s.forEach(function(t){var r=ne(e,t);r&&n.definitions.push(r)}),n}$e(f,"updateMemoList");const Le={mixins:[he,me],emits:["new-list-saved"],data(){return{savedCart:null,useCartCode:!0,isUpdating:!1,isUpdatingCart:!1,isUpdatingAddtoCart:!1,nameMaxLength:40,descriptionMaxLength:255}},computed:{memoListOrSavedCart(){return this.memoList.newListId?this.savedCart||{}:this.memoList},productCount(){var e;return((e=this.savedCart)==null?void 0:e.totalItems)||0},cartCode(){var e;return((e=this.savedCart)==null?void 0:e.code)||null},namePlaceholder(){return this.$dict.get("memo-List.New-Name-Template",[this.isoDate])},cartName(){return this.nameInput||this.namePlaceholder},isoDate(){const e=new Date,i=e.getFullYear(),n=`0${e.getMonth()+1}`.substr(-2),a=`0${e.getDate()}`.substr(-2);return`${i}-${n}-${a}`}},methods:{triggerErrorMessage(){this.$refs.errorMessage&&this.$refs.errorMessage.trigger()},async getCartCode(e,i){var n;if(!this.cartCode&&!(await this.saveMetaData(this.cartName,this.descriptionInput||"")&&((n=this.savedCart)!=null&&n.code))){i();return}e(this.cartCode)},async saveMetaData(e,i){try{this.isUpdating=!0;const n={baseSiteId:this.$fischer.baseSiteId(),accessToken:this.$fischer.user.accessToken(),cartName:e,cartDescription:i,userId:this.$fischer.user.id()};let a;const s=this.savedCart||this.memoList;s.code?(a=f,n.code=s.code):a=k;const{data:{createMemoList:d,updateMemoList:o}}=await this.$apollo.mutate({mutation:a,variables:n}),t=d||o;this.memoList.newListId&&t.code&&this.$emit("new-list-saved",this.memoList.newListId,t.code),this.savedCart=t,n.code||this.sendEvent("memo_list_create")}catch(n){return console.error("Could not save memo list",n),this.triggerErrorMessage(),!1}finally{this.isUpdating=!1}return!0},async getCart(){try{if(!this.cartCode)return;this.isUpdatingCart=!0;const{data:{getMemoList:e}}=await this.$apollo.query({query:v,fetchPolicy:"no-cache",variables:{baseSiteId:this.$fischer.baseSiteId(),accessToken:this.$fischer.user.accessToken(),code:this.cartCode,userId:this.$fischer.user.id()}});this.savedCart=e}catch(e){console.error(e),this.triggerErrorMessage()}finally{this.isUpdatingCart=!1}},async addMemoListToCart(){try{this.isUpdatingAddtoCart=!0;const{data:{addMemoListToCart:{guid:e}}}=await this.$apollo.mutate({mutation:D,variables:{baseSiteId:this.$fischer.baseSiteId(),accessToken:this.$fischer.user.accessToken(),memoListCode:this.cartCode,isIds:R(),userId:this.$fischer.user.id(),lang:this.$fischer.language_639_1()}});if(!e)throw new Error("Received no cart guid!");this.$fischer.cartId!==e&&await this.$fischer.setCartId(e),this.notifyCartChange(),this.sendEvent("memo_list_cart",{memoListId:this.cartCode})}catch(e){console.error(e),this.triggerBuyMemoList()}finally{this.isUpdatingAddtoCart=!1}},async replaceCartWithMemoList(){try{this.isUpdatingAddtoCart=!0;const{data:{replaceCartWithMemoList:{guid:e}}}=await this.$apollo.mutate({mutation:P,variables:{baseSiteId:this.$fischer.baseSiteId(),accessToken:this.$fischer.user.accessToken(),memoListCode:this.cartCode,isIds:R(),userId:this.$fischer.user.id(),lang:this.$fischer.language_639_1()}});if(!e)throw new Error("Received no cart guid!");this.$fischer.cartId!==e&&await this.$fischer.setCartId(e),this.notifyCartChange(),this.sendEvent("memo_list_cart",{memoListId:this.cartCode})}catch(e){console.error(e),this.isUpdatingAddtoCart=!1,this.triggerBuyMemoList()}finally{this.isUpdatingAddtoCart=!1}},async triggerBuyMemoList(){if(this.productCount!==0)try{if(!this.$refs.addToCartDialog){console.error("Could not find addToCartDialog"),this.triggerErrorMessage();return}await this.getCartPositionsCount()>0?this.$refs.addToCartDialog.show():await this.addMemoListToCart()}catch(e){console.error(e),this.triggerErrorMessage()}finally{this.isUpdatingAddtoCart=!1}}}};var _={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"addCartOrProductToMemoList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accessToken"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BaseSiteId"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"isIds"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"memoListCodes"}},type:{kind:"NonNullType",type:{kind:"ListType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"newListName"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"product"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"quantity"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"addCart"}},type:{kind:"NamedType",name:{kind:"Name",value:"Boolean"}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addCartOrProductToMemoList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"accessToken"},value:{kind:"Variable",name:{kind:"Name",value:"accessToken"}}},{kind:"Argument",name:{kind:"Name",value:"baseSiteId"},value:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}}},{kind:"Argument",name:{kind:"Name",value:"isIds"},value:{kind:"Variable",name:{kind:"Name",value:"isIds"}}},{kind:"Argument",name:{kind:"Name",value:"memoListCodes"},value:{kind:"Variable",name:{kind:"Name",value:"memoListCodes"}}},{kind:"Argument",name:{kind:"Name",value:"newListName"},value:{kind:"Variable",name:{kind:"Name",value:"newListName"}}},{kind:"Argument",name:{kind:"Name",value:"product"},value:{kind:"Variable",name:{kind:"Name",value:"product"}}},{kind:"Argument",name:{kind:"Name",value:"quantity"},value:{kind:"Variable",name:{kind:"Name",value:"quantity"}}},{kind:"Argument",name:{kind:"Name",value:"addCart"},value:{kind:"Variable",name:{kind:"Name",value:"addCart"}}},{kind:"Argument",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}}],directives:[]}]}}],loc:{start:0,end:501}};_.loc.source={body:`mutation addCartOrProductToMemoList(
  $accessToken: String!
  $baseSiteId: BaseSiteId!
  $isIds: Boolean!
  $memoListCodes: [String]!
  $newListName: String
  $product: String
  $quantity: Int
  $addCart: Boolean
  $userId: String!
) {
  addCartOrProductToMemoList(
    accessToken: $accessToken
    baseSiteId: $baseSiteId
    isIds: $isIds
    memoListCodes: $memoListCodes
    newListName: $newListName
    product: $product
    quantity: $quantity
    addCart: $addCart
    userId: $userId
  )
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function C(e,i){if(e.kind==="FragmentSpread")i.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&i.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(a){C(a,i)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(a){C(a,i)}),e.definitions&&e.definitions.forEach(function(a){C(a,i)})}var G={};(function(){_.definitions.forEach(function(i){if(i.name){var n=new Set;C(i,n),G[i.name.value]=n}})})();function ae(e,i){for(var n=0;n<e.definitions.length;n++){var a=e.definitions[n];if(a.name&&a.name.value==i)return a}}function we(e,i){var n={kind:e.kind,definitions:[ae(e,i)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var a=G[i]||new Set,s=new Set,d=new Set;for(a.forEach(function(t){d.add(t)});d.size>0;){var o=d;d=new Set,o.forEach(function(t){if(!s.has(t)){s.add(t);var r=G[t]||new Set;r.forEach(function(l){d.add(l)})}})}return s.forEach(function(t){var r=ae(e,t);r&&n.definitions.push(r)}),n}we(_,"addCartOrProductToMemoList");var E={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getMemoLists"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BaseSiteId"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"accessToken"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"userId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getMemoLists"},arguments:[{kind:"Argument",name:{kind:"Name",value:"baseSiteId"},value:{kind:"Variable",name:{kind:"Name",value:"baseSiteId"}}},{kind:"Argument",name:{kind:"Name",value:"accessToken"},value:{kind:"Variable",name:{kind:"Name",value:"accessToken"}}},{kind:"Argument",name:{kind:"Name",value:"userId"},value:{kind:"Variable",name:{kind:"Name",value:"userId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalItems"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"code"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]}]}}]}}],loc:{start:0,end:249}};E.loc.source={body:`query getMemoLists(
  $baseSiteId: BaseSiteId!
  $accessToken: String!
  $userId: String!
) {
  getMemoLists(
    baseSiteId: $baseSiteId
    accessToken: $accessToken
    userId: $userId
  ) {
    totalItems
    code
    name
    description
  }
}
`,name:"GraphQL request",locationOffset:{line:1,column:1}};function F(e,i){if(e.kind==="FragmentSpread")i.add(e.name.value);else if(e.kind==="VariableDefinition"){var n=e.type;n.kind==="NamedType"&&i.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach(function(a){F(a,i)}),e.variableDefinitions&&e.variableDefinitions.forEach(function(a){F(a,i)}),e.definitions&&e.definitions.forEach(function(a){F(a,i)})}var z={};(function(){E.definitions.forEach(function(i){if(i.name){var n=new Set;F(i,n),z[i.name.value]=n}})})();function te(e,i){for(var n=0;n<e.definitions.length;n++){var a=e.definitions[n];if(a.name&&a.name.value==i)return a}}function Ve(e,i){var n={kind:e.kind,definitions:[te(e,i)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var a=z[i]||new Set,s=new Set,d=new Set;for(a.forEach(function(t){d.add(t)});d.size>0;){var o=d;d=new Set,o.forEach(function(t){if(!s.has(t)){s.add(t);var r=z[t]||new Set;r.forEach(function(l){d.add(l)})}})}return s.forEach(function(t){var r=te(e,t);r&&n.definitions.push(r)}),n}Ve(E,"getMemoLists");const Ce={name:"AddToMemoListDialogFi",components:{DialogModalFi:ue,HeadlineFi:ke,IconFi:ve,TextInputFi:fe},mixins:[Le],props:{multiple:Boolean,addCart:Boolean,product:{type:String,default:null},quantity:{type:Number,default:null}},emits:["added-to-memolist","error-occured","error-occured"],data(){return{isShown:!1,name:"",description:null,getMemoLists:[],showNewList:!1,newListName:"",selectedList:null,newListCode:"new_list"}},created(){this.multiple&&(this.selectedList=[])},apollo:{getMemoLists:{query:E,variables(){return{baseSiteId:this.$fischer.baseSiteId(),accessToken:this.$fischer.user.accessToken(),userId:this.$fischer.user.id()}},skip(){return!this.isShown},error(){this.$emit("error-occured","Could not load memo-lists"),this.close()}}},methods:{async newList(){this.showNewList=!0,await this.$nextTick(),this.$refs.newNameInput.focus(),this.multiple?this.selectedList.includes(this.newListCode)||this.selectedList.push(this.newListCode):this.selectedList=this.newListCode},async show(){this.selectedList=this.multiple?[]:null,this.showNewList=!1,this.newListName="",this.$refs.dialogModal.open(),this.isShown=!0},async confirm(){this.close();try{const e=this.multiple?this.selectedList:[this.selectedList];await this.$apollo.mutate({mutation:_,variables:{baseSiteId:this.$fischer.baseSiteId(),accessToken:this.$fischer.user.accessToken(),userId:this.$fischer.user.id(),isIds:R(),memoListCodes:e,newListName:this.newListName||this.namePlaceholder,addCart:this.addCart,product:this.product,quantity:this.quantity}});const i=e.map(s=>{if(s==="new_list")return this.newListName;const d=this.getMemoLists.find(o=>o.code===s);return d?d.name:s}),n=this.multiple&&this.selectedList.length>1;let a;this.addCart?n?a="memo-List.Notifications.Added-Cart-To-List-Plural":a="memo-List.Notifications.Added-Cart-To-List-Singular":n?a="memo-List.Notifications.Added-Product-To-List-Plural":a="memo-List.Notifications.Added-Product-To-List-Singular",this.$store.dispatch("notifications/openToastNotification",{name:"added-to-memo-list",message:{value:this.$dict.get(a,[`<strong>${i.join(", ")}</strong>`])},type:"success",icon:"check"}),e.includes("new_list")&&(this.addCart?this.sendEvent("memo_list_create_from_cart"):this.sendEvent("memo_list_create")),this.$emit("added-to-memolist")}catch(e){console.error(e),this.$emit("error-occured","Could not add cart to memo-list")}},close(){this.$refs.dialogModal.close(),this.isShown=!1}}},Fe={id:"add-to-memo-list-dialog-fi__group"},De={key:0,class:"add-to-memo-list-dialog-fi__list preferNonApp"},Pe={class:"add-to-memo-list-dialog-fi__list-name"},_e={class:"add-to-memo-list-dialog-fi__list-name"},Ee={class:"add-to-memo-list-dialog-fi__list-count"},Me={class:"add-to-memo-list-dialog-fi__actions"};function Ae(e,i,n,a,s,d){const o=h("headline-fi"),t=h("button-fi"),r=h("text-input-fi"),l=h("icon-fi"),oe=h("dialog-modal-fi");return c(),M(oe,{ref:"dialogModal",class:"add-to-memo-list-dialog-fi","data-test":"modal-add-to-memo-list"},{header:u(()=>[p(o,{tag:"h2",size:24},{default:u(()=>[n.addCart?(c(),b(A,{key:0},[S(N(e.$dict.get("memo-List.Add-To-Memo-List-Dialog.Headline-Cart")),1)],64)):(c(),b(A,{key:1},[S(N(e.$dict.get("memo-List.Add-To-Memo-List-Dialog.Headline-Product")),1)],64))]),_:1})]),body:u(()=>[p(t,{type:"button",class:"button-fi__primary add-to-memo-list-dialog-fi__new-list-button","data-test":"create-memo-list",onClick:d.newList},{default:u(()=>[S(N(e.$dict.get("memo-List.Add-To-Memo-List-Dialog.New-List")),1)]),_:1},8,["onClick"]),y("fieldset",Fe,[s.showNewList?(c(),b("label",De,[(c(),M(H(n.multiple?"checkbox-fi":"radio-fi"),{ref:"newNameRadio",modelValue:s.selectedList,"onUpdate:modelValue":i[0]||(i[0]=m=>s.selectedList=m),value:s.newListCode,name:"add-to-memo-list-dialog-fi__group",class:"add-to-memo-list-dialog-fi__list-selector",wrapped:"","wrapper-tag":"div"},null,8,["modelValue","value"])),y("div",Pe,[p(r,{ref:"newNameInput",modelValue:s.newListName,"onUpdate:modelValue":i[1]||(i[1]=m=>s.newListName=m),modelModifiers:{trim:!0},placeholder:e.namePlaceholder,maxlength:e.nameMaxLength,"data-test":"memo-list-name-input","show-max-length":"",transparent:"",clear:""},null,8,["modelValue","placeholder","maxlength"])])])):Ne("",!0),(c(!0),b(A,null,pe(s.getMemoLists,m=>(c(),b("label",{key:m.code,class:"add-to-memo-list-dialog-fi__list preferNonApp"},[(c(),M(H(n.multiple?"checkbox-fi":"radio-fi"),{modelValue:s.selectedList,"onUpdate:modelValue":i[2]||(i[2]=le=>s.selectedList=le),value:m.code,name:"add-to-memo-list-dialog-fi__group",class:"add-to-memo-list-dialog-fi__list-selector",wrapped:"","wrapper-tag":"div"},null,8,["modelValue","value"])),y("div",_e,N(m.name),1),y("div",Ee,N(e.$dict.get(m.totalItems!==1?"memo-List.List-Product-Count-Plural":"memo-List.List-Product-Count-Singular",[m.totalItems])),1)]))),128))])]),footer:u(()=>[y("div",Me,[p(t,{type:"button",class:ge({"button-fi__tertiary":!0,"button-fi__xs-streched":!0,"edit-memo-list-dialog-fi__replace-button":!0}),onClick:d.close},{default:u(()=>[S(N(e.$dict.get("online-Shop.Global-Labels.Cancel")),1)]),_:1},8,["onClick"]),p(t,{type:"button",class:"button-fi__primary button-fi__xs-streched edit-memo-list-dialog-fi__merge-button","data-test":"add-to-memo-list",disabled:s.selectedList===null||s.selectedList.length===0,onClick:d.confirm},{default:u(()=>[S(N(e.$dict.get("memo-List.Add-To-Memo-List-Dialog.Confirm")),1)]),_:1},8,["disabled","onClick"])])]),button:u(()=>[p(l,{icon:"close"})]),_:1},512)}const qe=ce(Ce,[["render",Ae]]);export{qe as A,Le as _,E as d};