import{a as u}from"./chunk-YJCJDCVP.js";import{a as y}from"./chunk-OASPW2P2.js";import{a as w}from"./chunk-YBFCDINU.js";import{a as c,b as v}from"./chunk-STJ3LWFL.js";import{p as d,v as f}from"./chunk-PTIJDS6I.js";import{b as s}from"./chunk-Q6LCSRIW.js";import{J as h,u as p}from"./chunk-E24W34C4.js";import{r as O}from"./chunk-T6CC5WUU.js";import{e as I,g as m}from"./chunk-VKWPEFWQ.js";m();m();async function F(o,t){let i=new u(o),E=(await(t.development?i.find():i.fetch()))?.id,n=await y(o,{header:"Select a theme to open",filter:{live:t.live,theme:t.development?`${E}`:t.theme}}),l=c(n,o),a=v(n,o);p({body:["Preview information for theme",...w(n),`

`,{list:{items:[{link:{label:"Preview your theme",url:l}},{link:{label:"Customize your theme at the theme editor",url:a}}]}}]}),t.editor?await h(a):await h(l)}var r=I(O(),1);var g,e=class extends f{async command(t,i){await F(i,t)}};g=e;e.summary="Opens the preview of your remote theme.";e.descriptionWithMarkdown=`Returns links that let you preview the specified theme. The following links are returned:

  - A link to the [editor](https://shopify.dev/docs/themes/tools/online-editor) for the theme in the Shopify admin.
  - A [preview link](https://help.shopify.com/manual/online-store/themes/adding-themes#share-a-theme-preview-with-others) that you can share with other developers.

  If you don't specify a theme, then you're prompted to select the theme to open from the list of the themes in your store.`;e.description=g.descriptionWithoutMarkdown();e.flags={...s,...d,development:r.Flags.boolean({char:"d",description:"Open your development theme.",env:"SHOPIFY_FLAG_DEVELOPMENT"}),editor:r.Flags.boolean({char:"E",description:"Open the theme editor for the specified theme in the browser.",env:"SHOPIFY_FLAG_EDITOR"}),live:r.Flags.boolean({char:"l",description:"Open your live (published) theme.",env:"SHOPIFY_FLAG_LIVE"}),theme:r.Flags.string({char:"t",description:"Theme ID or name of the remote theme.",env:"SHOPIFY_FLAG_THEME_ID"})};e.multiEnvironmentsFlags=null;var S=e;export{S as a};
