/*! For license information please see variable-product-tour.js.LICENSE.txt */
(()=>{"use strict";var e={93359:(e,t,r)=>{var o=r(99196),n=Symbol.for("react.element"),a=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),i=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,r){var o,c={},d=null,u=null;for(o in void 0!==r&&(d=""+r),void 0!==t.key&&(d=""+t.key),void 0!==t.ref&&(u=t.ref),t)a.call(t,o)&&!s.hasOwnProperty(o)&&(c[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps)void 0===c[o]&&(c[o]=t[o]);return{$$typeof:n,type:e,key:d,ref:u,props:c,_owner:i.current}}},81514:(e,t,r)=>{e.exports=r(93359)},99196:e=>{e.exports=window.React}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}};return e[o](a,a.exports,r),a.exports}r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};(()=>{r.r(o);const e=window.wp.element,t=window.wp.i18n,n=window.wc.components,a=window.wc.data,i=window.wc.tracks;var s=r(81514);function c(e,t){return e[t]?.meta?.name}const d=()=>{const[r,o]=(0,e.useState)(!1),{updateUserPreferences:d,variable_product_tour_shown:u}=(0,a.useUserPreferences)(),p={steps:[{referenceElements:{desktop:".attribute_tab"},focusElement:{desktop:".attribute_tab"},meta:{name:"attributes",heading:(0,t.__)("Start by adding attributes","woocommerce"),descriptions:{desktop:(0,t.__)("Add attributes like size and color for customers to choose from on the product page. We will use them to generate product variations.","woocommerce")},primaryButton:{text:(0,t.__)("Got it","woocommerce")}}}],options:{effects:{spotlight:{interactivity:{enabled:!0,rootElementSelector:"#wpwrap"}},arrowIndicator:!0,liveResize:{mutation:!0,resize:!0,rootElementSelector:"#wpwrap"}}},closeHandler:(e,t)=>{d({variable_product_tour_shown:"yes"}),o(!1),t===e.length-1?(0,i.recordEvent)("variable_product_tour_completed",{step:c(e,t)}):(0,i.recordEvent)("variable_product_tour_dismissed",{step:c(e,t)})}};return(0,e.useEffect)((()=>{const e=document.querySelector("#product-type");if("yes"!==u&&e)return e.addEventListener("change",t),()=>{e.removeEventListener("change",t)};function t(){"variable"===e.value&&(o(!0),(0,i.recordEvent)("variable_product_tour_started",{step:c(p.steps,0)}))}})),r?(0,s.jsx)(n.TourKit,{config:p}):null},u=document.createElement("div");u.setAttribute("id","variable-product-tour-root"),(0,e.createRoot)(document.body.appendChild(u)).render((0,s.jsx)(d,{}))})(),(window.wc=window.wc||{}).variableProductTour=o})();