var __awaiter=this&&this.__awaiter||function(t,r,n,o){function e(t){return t instanceof n?t:new n((function(r){r(t)}))}return new(n||(n=Promise))((function(n,a){function s(t){try{i(o.next(t))}catch(t){a(t)}}function c(t){try{i(o["throw"](t))}catch(t){a(t)}}function i(t){t.done?n(t.value):e(t.value).then(s,c)}i((o=o.apply(t,r||[])).next())}))};var __generator=this&&this.__generator||function(t,r){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,e,a,s;return s={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function c(t){return function(r){return i([t,r])}}function i(s){if(o)throw new TypeError("Generator is already executing.");while(n)try{if(o=1,e&&(a=s[0]&2?e["return"]:s[0]?e["throw"]||((a=e["return"])&&a.call(e),0):e.next)&&!(a=a.call(e,s[1])).done)return a;if(e=0,a)s=[s[0]&2,a.value];switch(s[0]){case 0:case 1:a=s;break;case 4:n.label++;return{value:s[1],done:false};case 5:n.label++;e=s[1];s=[0];continue;case 7:s=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]<a[3])){n.label=s[1];break}if(s[0]===6&&n.label<a[1]){n.label=a[1];a=s;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(s);break}if(a[2])n.ops.pop();n.trys.pop();continue}s=r.call(t,n)}catch(t){s=[6,t];e=0}finally{o=a=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,h as h$1}from"./index-38ad4957.js";import{n as h}from"./dom-context-hooks.module-50442785.js";var REVEAL_EVENT="sq:reveal";function useScroll(t){var r=t.scrollTagName,n=t.scrollId;function o(){return __awaiter(this,void 0,void 0,(function(){var o;return __generator(this,(function(e){switch(e.label){case 0:o=document===null||document===void 0?void 0:document.querySelector(r||"#"+n);o.dispatchEvent(new CustomEvent(REVEAL_EVENT,{detail:r||"#"+n,bubbles:true,composed:true}));return[4,new Promise((function(t){return setTimeout(t,500)}))];case 1:e.sent();o.scrollIntoView({behavior:t.scrollAnimation});return[2]}}))}))}return{callbacks:{scroll:o}}}var Scroll=function(){function t(t){registerInstance(this,t);this.ignored=true;this.scrollAnimation="smooth";h(this)}t.prototype.disconnectedCallback=function(){};t.prototype.render=function(){var t=useScroll(this).callbacks;var r='\n    *::part(secondarybutton-base),\n    sl-button[type="secondary"]::part(base) {\n      font-family: var(--sqm-primary-font);\n      background-color: var(--sqm-secondary-button-background);\n      color: var(--sqm-secondary-button-color);\n      border-color: var(--sqm-secondary-button-color-border);\n      border-radius: var(--sqm-secondary-button-radius);\n    }\n\n    *::part(secondarybutton-base):hover,\n    sl-button[type="secondary"]::part(base):hover {\n      background-color: var(--sqm-secondary-button-background-hover);\n      color: var(--sqm-secondary-button-color-hover);\n      border-color: var(--sqm-secondary-button-border-color-hover);\n    }\n  ';return h$1("sl-button",{type:"secondary",exportparts:"base: secondarybutton-base",onClick:t.scroll,size:this.size,pill:this.pill,circle:this.circle},h$1("style",{type:"text/css"},r),(this.iconSlot||this.iconName)&&h$1("sl-icon",{slot:this.iconSlot||"prefix",name:this.iconName}),this.buttonText,h$1("slot",null))};return t}();export{Scroll as sqm_scroll};